% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geometry.R
\name{st_intersects}
\alias{st_intersects}
\alias{st_intersects.odata_request}
\alias{st_intersects.stac_request}
\title{Filter OData and STAC Requests Using Geometries}
\usage{
st_intersects.odata_request(x, y, sparse = FALSE, ...)

st_intersects.stac_request(x, y, sparse = FALSE, ...)
}
\arguments{
\item{x}{Either an \code{odata_request} class object, generated with
\code{\link[=dse_odata_products_request]{dse_odata_products_request()}}/\code{\link[=dse_odata_bursts_request]{dse_odata_bursts_request()}}; or
a \code{stac_request} generated with \code{\link[=dse_stac_search_request]{dse_stac_search_request()}}.}

\item{y}{A spatial geometry of either class \code{sf} (see \code{\link[sf:st_as_sf]{sf::st_as_sf()}}) or
\code{sfc} (see \code{\link[sf:st_as_sfc]{sf::st_as_sfc()}}). It
will always be transformed to WGS 84 projection (EPSG:4326).}

\item{sparse}{Argument inherited from generic definition. Ignored in this context}

\item{...}{Ignored}
}
\value{
Returns an object of the same class as \code{x}, with the geometry filter added
to it.
}
\description{
Filters OData and STAC rows that intersect with spatial feature \code{y}.
}
\examples{
if (interactive()) {
  bbox <-
    sf::st_bbox(
      c(xmin = 5.261, ymin = 52.680, xmax = 5.319, ymax = 52.715),
      crs = 4326) |>
      sf::st_as_sfc()

  dse_odata_products_request() |>
    dplyr::filter(
      `ContentDate/Start` > "2025-01-01") |>
    sf::st_intersects(bbox) |>
    dplyr::collect()

  dse_stac_search_request("sentinel-2-l1c") |>
    sf::st_intersects(bbox) |>
    dplyr::collect()
}
}
\concept{geometry}
