sentinelhub_byoc

Module implementing an interface with Sentinel Hub Bring your own COG service

class sentinelhub.sentinelhub_byoc.ByocCollectionAdditionalData(other_data: Optional[CatchAllVar], bands: Optional[dict] = None, max_meters_per_pixel: Optional[float] = None, max_meters_per_pixel_override: Optional[float] = None)[source]

Bases: object

Dataclass to hold BYOC collection additional data

class sentinelhub.sentinelhub_byoc.ByocCollection(name: str, s3_bucket: str, other_data: Optional[CatchAllVar], collection_id: Optional[str] = None, user_id: Optional[str] = None, created: Optional[datetime.datetime] = None, additional_data: Optional[sentinelhub.sentinelhub_byoc.ByocCollectionAdditionalData] = None, no_data: Union[int, float, None] = None)[source]

Bases: object

Dataclass to hold BYOC collection data

to_data_collection()[source]

Returns a DataCollection enum for this BYOC collection

class sentinelhub.sentinelhub_byoc.ByocTile(path: str, other_data: Optional[CatchAllVar], status: Optional[str] = None, tile_id: Optional[str] = None, tile_geometry: Optional[sentinelhub.geometry.Geometry] = None, cover_geometry: Optional[sentinelhub.geometry.Geometry] = None, created: Optional[datetime.datetime] = None, sensing_time: Optional[datetime.datetime] = None, additional_data: Optional[dict] = None)[source]

Bases: object

Dataclass to hold BYOC tile data

class sentinelhub.sentinelhub_byoc.SentinelHubBYOC(base_url=None, config=None)[source]

Bases: object

An interface class for Sentinel Hub Bring your own COG (BYOC) API

For more info check BYOC API reference.

iter_collections()[source]

Retrieve collections

BYOC API reference

Returns:iterator over collections
get_collection(collection)[source]

Get collection by its id

BYOC API reference

Parameters:collection – a ByocCollection, dict or collection id string
Returns:dictionary of the collection
Return type:dict
create_collection(collection)[source]

Create a new collection

BYOC API reference

Parameters:collection – ByocCollection object or a dictionary
Returns:dictionary of the created collection
Return type:dict
update_collection(collection)[source]

Update an existing collection

BYOC API reference

Parameters:collection – ByocCollection object or a dictionary
delete_collection(collection)[source]

Delete existing collection by its id

BYOC API reference

Parameters:collection – a ByocCollection, dict or collection id string
copy_tiles(from_collection, to_collection)[source]

Copy tiles from one collection to another

BYOC API reference

Parameters:
  • from_collection – a ByocCollection, dict or collection id string
  • to_collection – a ByocCollection, dict or collection id string
iter_tiles(collection)[source]

Iterator over collection tiles

BYOC API reference

Parameters:collection – a ByocCollection, dict or collection id string
Returns:iterator
get_tile(collection, tile)[source]

Get a tile of collection

BYOC API reference

Parameters:
  • collection – a ByocCollection, dict or collection id string
  • tile – a ByocTile, dict or tile id string
Returns:

dictionary of the tile

Return type:

dict

create_tile(collection, tile)[source]

Create tile within collection

BYOC API reference

Parameters:
  • collection – a ByocCollection, dict or collection id string
  • tile – a ByocTile or dict
Returns:

dictionary of the tile

Return type:

dict

update_tile(collection, tile)[source]

Update a tile within collection

BYOC API reference

Parameters:
  • collection – a ByocCollection, dict or collection id string
  • tile – a ByocTile or dict
delete_tile(collection, tile)[source]

Delete a tile from collection

BYOC API reference

Parameters:
  • collection – a ByocCollection, dict or collection id string
  • tile – a ByocTile, dict or tile id string