sentinelhub.api.wfs

Interface of Sentinel Hub Web Feature Service (WFS).

class sentinelhub.api.wfs.WebFeatureService(bbox, time_interval, *, data_collection, maxcc=1.0, config=None)[source]

Bases: FeatureIterator[Dict[str, Any]]

Class for interaction with Sentinel Hub WFS service

The class is an iterator over info about all available satellite tiles for requested parameters. It collects data from Sentinel Hub service only during the first iteration. During next iterations it returns already obtained data. The data is in the same order as returned by the service.

For more info check WFS documentation.

Parameters:
  • bbox (BBox) – Bounding box of the requested image. Coordinates must be in the specified coordinate reference system.

  • time_interval (RawTimeType | RawTimeIntervalType) – interval with start and end date of the form YYYY-MM-DDThh:mm:ss or YYYY-MM-DD

  • data_collection (DataCollection) – A collection of requested satellite data

  • maxcc (float) – Maximum accepted cloud coverage of an image. Float between 0.0 and 1.0. Default is 1.0.

  • config (SHConfig | None) – A custom instance of config class to override parameters from the saved configuration.

get_dates()[source]

Returns a list of acquisition times from tile info data

Returns:

List of acquisition times in the order returned by WFS service.

Return type:

list[datetime.date | None]

get_geometries()[source]

Returns a list of geometries from tile info data

Returns:

List of multipolygon geometries in the order returned by WFS service.

Return type:

list[shapely.geometry.multipolygon.MultiPolygon]

get_tiles()[source]

Returns list of tiles with tile name, date and AWS index

Returns:

List of tiles in form of (tile_name, date, aws_index)

Return type:

list[tuple[str, str, int]]