items: Endpoint functions

Description Usage Arguments Value See Also Examples

View source: R/items.R

Description

The items function implements WFS3 /collections/{collectionId}/items, and /collections/{collectionId}/items/{featureId} endpoints.

Each endpoint retrieves specific STAC objects:

The endpoint /collections/{collectionId}/items accepts the same filters parameters of stac_search function.

Usage

1
items(q, feature_id = NULL, datetime = NULL, bbox = NULL, limit = NULL)

Arguments

q

a RSTACQuery object expressing a STAC query criteria.

feature_id

a character with item id to be fetched. Only works if the collection_id is informed. This is equivalent to the endpoint /collections/{collectionId}/items/{featureId}.

datetime

a character with a date-time or an interval. Date and time strings needs to conform RFC 3339. Intervals are expressed by separating two date-time strings by '/' character. Open intervals are expressed by using '..' in place of date-time.

Examples:

  • A date-time: "2018-02-12T23:20:50Z"

  • A closed interval: "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z"

  • Open intervals: "2018-02-12T00:00:00Z/.." or "../2018-03-18T12:31:12Z"

Only features that have a datetime property that intersects the interval or date-time informed in datetime are selected.

bbox

a numeric vector with only features that have a geometry that intersects the bounding box are selected. The bounding box is provided as four or six numbers, depending on whether the coordinate reference system includes a vertical axis (elevation or depth):

  • Lower left corner, coordinate axis 1

  • Lower left corner, coordinate axis 2

  • Lower left corner, coordinate axis 3 (optional)

  • Upper right corner, coordinate axis 1

  • Upper right corner, coordinate axis 2

  • Upper right corner, coordinate axis 3 (optional)

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).

limit

an integer defining the maximum number of results to return. If not informed it defaults to the service implementation.

Value

A RSTACQuery object with the subclass items for /collections/{collection_id}/items endpoint, or a item_id subclass for /collections/{collection_id}/items/{feature_id} endpoint, containing all search field parameters to be provided to STAC API web service.

See Also

get_request, post_request, collections

Examples

1
2
3
4
5
6
7
8
9
stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
  collections("CB4_64_16D_STK-1") %>%
  items(bbox = c(-47.02148, -12.98314, -42.53906, -17.35063)) %>%
  get_request()

stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
  collections("CB4_64_16D_STK-1") %>%
  items("CB4_64_16D_STK_v001_022023_2020-07-11_2020-07-26") %>%
  get_request()

rstac documentation built on July 10, 2021, 5:08 p.m.