areas¶
Module for working with large geographical areas

class
sentinelhub.areas.
BBoxSplitter
(shape_list, crs, split_shape, **kwargs)[source]¶ A tool that splits the given area into smaller parts. Given the area it calculates its bounding box and splits it into smaller bounding boxes of equal size. Then it filters out the bounding boxes that do not intersect the area. If specified by user it can also reduce the sizes of the remaining bounding boxes to best fit the area.
Parameters:  shape_list (list(shapely.geometry.multipolygon.MultiPolygon or shapely.geometry.polygon.Polygon)) – A list of geometrical shapes describing the area of interest
 crs (CRS) – Coordinate reference system of the shapes in shape_list
 split_shape (int or (int, int)) – Parameter that describes the shape in which the area bounding box will be split. It can be a tuple of the form (n, m) which means the area bounding box will be split into n columns and m rows. It can also be a single integer n which is the same as (n, n).
 reduce_bbox_sizes (bool) – If True it will reduce the sizes of bounding boxes so that they will tightly fit the given area geometry from shape_list.

class
sentinelhub.areas.
OsmSplitter
(shape_list, crs, zoom_level, **kwargs)[source]¶ A tool that splits the given area into smaller parts. For the splitting it uses Open Street Map (OSM) grid on the specified zoom level. It calculates bounding boxes of all OSM tiles that intersect the area. If specified by user it can also reduce the sizes of the remaining bounding boxes to best fit the area.
Parameters:  shape_list (list(shapely.geometry.multipolygon.MultiPolygon or shapely.geometry.polygon.Polygon)) – A list of geometrical shapes describing the area of interest
 crs (CRS) – Coordinate reference system of the shapes in shape_list
 zoom_level (int) – A zoom level defined by OSM. Level 0 is entire world, level 1 splits the world into 4 parts, etc.
 reduce_bbox_sizes (bool) – If True it will reduce the sizes of bounding boxes so that they will tightly fit the given area geometry from shape_list.

class
sentinelhub.areas.
TileSplitter
(shape_list, crs, time_interval, tile_split_shape=1, data_source=<DataSource.SENTINEL2_L1C: (<_Source.SENTINEL2: 'Sentinel2'>, <_ProcessingLevel.L1C: 'L1C'>)>, instance_id=None, **kwargs)[source]¶ A tool that splits the given area into smaller parts. Given the area, time interval and data source it collects info from Sentinel Hub WFS service about all satellite tiles intersecting the area. For each of them it calculates bounding box and if specified it splits these bounding boxes into smaller bounding boxes. Then it filters out the ones that do not intersect the area. If specified by user it can also reduce the sizes of the remaining bounding boxes to best fit the area.
Parameters:  shape_list (list(shapely.geometry.multipolygon.MultiPolygon or shapely.geometry.polygon.Polygon)) – A list of geometrical shapes describing the area of interest
 crs (CRS) – Coordinate reference system of the shapes in shape_list
 time_interval ((str, str)) – Interval with start and end date of the form YYYYMMDDThh:mm:ss or YYYYMMDD
 tile_split_shape – Parameter that describes the shape in which the satellite tile bounding boxes will be split. It can be a tuple of the form (n, m) which means the tile bounding boxes will be split into n columns and m rows. It can also be a single integer n which is the same as (n, n).
 data_source (sentinelhub.constants.DataSource) – Source of requested satellite data. Default is Sentinel2 L1C data.
 instance_id (str) – User’s Sentinel Hub instance id. If None the instance id is taken from the
config.json
configuration file.  reduce_bbox_sizes (bool) – If True it will reduce the sizes of bounding boxes so that they will tightly fit the given area geometry from shape_list.

class
sentinelhub.areas.
CustomGridSplitter
(shape_list, crs, bbox_grid, bbox_split_shape=1, **kwargs)[source]¶ Splitting class which can split according to given custom collection of bounding boxes
Parameters:  shape_list (list(shapely.geometry.multipolygon.MultiPolygon or shapely.geometry.polygon.Polygon)) – A list of geometrical shapes describing the area of interest
 crs (CRS) – Coordinate reference system of the shapes in shape_list
 bbox_grid (list(BBox) or BBoxCollection) – A collection of bounding boxes defining a grid of splitting. All of them have to be in the same CRS.
 bbox_split_shape (int or (int, int)) – Parameter that describes the shape in which each of the bounding boxes in the given grid will be split. It can be a tuple of the form (n, m) which means the tile bounding boxes will be split into n columns and m rows. It can also be a single integer n which is the same as (n, n).
 reduce_bbox_sizes (bool) – If True it will reduce the sizes of bounding boxes so that they will tightly fit the given geometry in shape_list.