stac_search {rstac} | R Documentation |
Endpoint functions
Description
(This document is based on STAC specification documentation https://github.com/radiantearth/stac-spec/ and reproduces some of its parts)
The stac_search
function implements /stac/search
API endpoint
(v0.8.1) and /search
(v0.9.0 or v1.0.0).
It prepares query parameters used in the search API request, a
stac
object with all filter parameters to be provided to
get_request
or post_request
functions. The GeoJSON content
returned by these requests is a doc_items
object, a regular R
list
representing a STAC Item Collection document.
Usage
stac_search(
q,
collections = NULL,
ids = NULL,
bbox = NULL,
datetime = NULL,
intersects = NULL,
limit = NULL
)
Arguments
q |
a |
collections |
a |
ids |
a |
bbox |
a
The coordinate reference system of the values is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84). The values are, in most cases, the sequence of minimum longitude, minimum latitude, maximum longitude, and maximum latitude. However, in cases where the box spans the antimeridian, the first value (west-most box edge) is larger than the third value (east-most box edge). |
datetime |
a Examples:
Only features that have a |
intersects |
a |
limit |
an |
Value
A rstac_query
object with the subclass search
containing all
search field parameters to be provided to STAC API web service.
See Also
stac()
, ext_query()
,
get_request()
, post_request()
Examples
## Not run:
# GET request
stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
stac_search(collections = "CB4-16D-2", limit = 10,
datetime = "2017-08-01/2018-03-01") %>%
get_request()
# POST request
stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
stac_search(collections = "CB4-16D-2",
bbox = c(-47.02148, -17.35063, -42.53906, -12.98314)) %>%
post_request()
## End(Not run)