cql2_helpers {rstac} | R Documentation |
CQL2 helper function
Description
These are helper functions to easy construction CQL2 expressions.
These functions are not meant to be used in expressions and they must
be escaped using {{
to be evaluated before request.
Usage
cql2_bbox_as_geojson(bbox)
cql2_date(x)
cql2_timestamp(x)
cql2_interval(start = "..", end = "..")
Arguments
bbox |
a |
x , start , end |
a |
Details
-
cql2_bbox_as_geojson()
: used to convert bounding box (bbox) to a GeoJSON object to be used as argument of CQL2 spatial operators. -
cql2_date()
,cql2_timestamp()
, andcql2_interval()
: create temporal literal values to be passed into CQL2 expressions.
Value
-
cql2_bbox_as_geojson()
: GeoJSON object. -
cql2_date()
,cql2_timestamp()
, andcql2_interval()
: internalrstac
expressions representing temporal values.
Examples
## Not run:
bbox <- c(-122.2751, 47.5469, -121.9613, 47.7458)
cql2_json(
collection == "landsat-c2-l2" &&
t_intersects(datetime, {{
cql2_interval("2020-12-01", "2020-12-31")
}}) &&
s_intersects(geometry, {{
cql2_bbox_as_geojson(bbox)
}})
)
## End(Not run)
[Package rstac version 1.0.1 Index]