Module for working with Sentinel Hub OGC services
Sentinel Hub OGC services class for providing image data
Intermediate layer between QGC-type requests (WmsRequest and WcsRequest) and the Sentinel Hub OGC (WMS and WCS) services.
Parameters: config (SHConfig or None) – A custom instance of config class to override parameters from the saved configuration.
Get download requests
Create a list of DownloadRequests for all Sentinel-2 acquisitions within request’s time interval and acceptable cloud coverage.
Parameters: request (OgcRequest or GeopediaRequest) – QGC-type request with specified bounding box, time interval, and cloud coverage for specific product. Returns: list of DownloadRequests
get_url(request, *, date=None, size_x=None, size_y=None, geometry=None)¶
Returns url to Sentinel Hub’s OGC service for the product specified by the OgcRequest and date.
dictionary with parameters
url to Sentinel Hub’s OGC service for this product.
Creates base url string.
Parameters: request (OgcRequest or GeopediaRequest) – OGC-type request with specified bounding box, cloud coverage for specific product. Returns: base string for url to Sentinel Hub’s OGC service for this product. Return type: str
Get available Sentinel-2 acquisitions at least time_difference apart
List of all available Sentinel-2 acquisitions for given bbox with max cloud coverage and the specified time interval. When a single time is specified the request will return that specific date, if it exists. If a time range is specified the result is a list of all scenes between the specified dates conforming to the cloud coverage criteria. Most recent acquisition being first in the list.
When a time_difference threshold is set to a positive value, the function filters out all datetimes which are within the time difference. The oldest datetime is preserved, all others all deleted.
Parameters: request (WmsRequest or WcsRequest) – OGC-type request Returns: List of dates of existing acquisitions for the given request Return type: list(datetime.datetime) or [None]
Verifies or calculates image dimensions.
Parameters: request (WmsRequest or WcsRequest) – OGC-type request Returns: horizontal and vertical dimensions of requested image Return type: (int or str, int or str)
WebFeatureService(bbox, time_interval, *, data_collection=None, maxcc=1.0, data_source=None, config=None)¶
Class for interaction with Sentinel Hub WFS service
The class is an iterator over info data of 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 order returned by Sentinel Hub WFS service.
- bbox (geometry.BBox) – Bounding box of the requested image. Coordinates must be in the specified coordinate reference system.
- time_interval ((str, str)) – 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 or None) – A custom instance of config class to override parameters from the saved configuration.
- data_source (DataCollection) – A deprecated alternative to data_collection
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.datetime)
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)