Sentinel
The vibe_core.data.sentinel
module extends the core data module to handle specific data types related to Sentinel satellite products. It provides classes for representing Sentinel product metadata, rasters, and sequences, making it easier to work with data obtained from Sentinel-1 and Sentinel-2 satellites.
In addition to handling Sentinel products, the module also includes classes for handling SpaceEye rasters and sequences, further expanding its capabilities in the domain of satellite data processing and analysis.
Hierarchy
Documentation
Data types and supporting functions for Sentinel data in FarmVibes.AI.
- class vibe_core.data.sentinel.CloudMask(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, categories)
Bases:
CategoricalRaster
,CloudRaster
,Sentinel2Product
Represent a cloud mask raster for a Sentinel-2 product.
- class vibe_core.data.sentinel.DownloadedSentinel1Product(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, sensor_mode, polarisation_mode, asset_map=<factory>)
Bases:
Sentinel1Product
Represent a downloaded Sentinel-1 product.
- add_zip_asset(asset_path)
Add a downloaded zip asset to the asset map of a
DownloadedSentinel1Product
.- Parameters:
asset_path (str) – The path to the downloaded zip file.
- get_zip_asset()
Retrieve the downloaded zip asset.
- Returns:
The downloaded zip asset.
- Return type:
- ZIP_FILE = 'zip'
The key for the zip asset in the asset map.
-
asset_map:
Dict
[str
,str
] A dictionary mapping the band name to the asset ID.
- class vibe_core.data.sentinel.DownloadedSentinel2Product(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, CLOUD_MASK='cloud_mask', asset_map=<factory>)
Bases:
Sentinel2Product
Represent a downloaded Sentinel-2 product.
- add_downloaded_band(band_name, asset_path)
Add a downloaded band to the asset map of a
DownloadedSentinel2Product
object.- Parameters:
band_name (str) – The name of the band to add.
asset_path (str) – The path to the downloaded band file.
- Raises:
ValueError – If the file type is not supported (types other than TIFF or JP2).
- add_downloaded_cloudmask(asset_path)
Add a downloaded cloud mask to the asset map.
- Parameters:
asset_path (str) – The path to the downloaded cloud mask file.
- get_downloaded_band(band_name)
Return the downloaded band asset for the given band name.
- Parameters:
band_name (str) – The name of the band to return.
- Returns:
The downloaded band asset.
- Return type:
- get_downloaded_cloudmask()
Retrieve the downloaded cloud mask asset.
- Returns:
The downloaded cloud mask asset.
- Return type:
-
CLOUD_MASK:
str
= 'cloud_mask' The key for the cloud mask asset in the asset map.
-
asset_map:
Dict
[str
,str
] A dictionary mapping the band name to the asset ID.
- class vibe_core.data.sentinel.S2ProcessingLevel(value)
Bases:
StrEnum
Enum for Sentinel 2 processing levels.
- L1C = 'L1C'
Level 1C processing level.
- L2A = 'L2A'
Level 2A processing level.
- class vibe_core.data.sentinel.Sentinel1Product(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, sensor_mode, polarisation_mode)
Bases:
SentinelProduct
Represent a Sentinel-1 product metadata.
-
polarisation_mode:
str
The polarisation mode of the Sentinel-1 product.
-
sensor_mode:
str
The sensor mode of the Sentinel-1 product.
-
polarisation_mode:
- class vibe_core.data.sentinel.Sentinel1Raster(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, sensor_mode, polarisation_mode, bands, tile_id)
Bases:
Raster
,Sentinel1Product
Represent a raster for a Sentinel-1 product.
-
tile_id:
str
The tile ID of the raster.
-
tile_id:
- class vibe_core.data.sentinel.Sentinel1RasterOrbitGroup(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, sensor_mode, polarisation_mode, bands, tile_id, asset_map=<factory>)
Bases:
Sentinel1Raster
Represent a group of Sentinel-1 raster orbits.
- add_raster(raster)
Add a raster to the orbit group.
- Parameters:
raster (Sentinel1Raster) – The raster to add to the orbit group.
- get_ordered_assets()
Return the assets in the orbit group in ascending order of acquisition date.
- Returns:
The list of sorted assets in the orbit group.
- Return type:
List[AssetVibe]
-
asset_map:
Dict
[str
,str
] A dictionary mapping the asset ID to the acquisition date.
- class vibe_core.data.sentinel.Sentinel1RasterTileSequence(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, sensor_mode, polarisation_mode, bands, tile_id, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>, write_time_range=<factory>)
Bases:
TileSequence
,Sentinel1Raster
Represent a sequence of Sentinel-1 rasters for a tile.
- class vibe_core.data.sentinel.Sentinel2CloudMask(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, categories)
Bases:
CloudMask
,Sentinel2Product
Represent a cloud mask raster for a Sentinel-2 product.
- class vibe_core.data.sentinel.Sentinel2CloudMaskOrbitGroup(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, categories, asset_map=<factory>)
Bases:
Sentinel2CloudMask
Represent a group of Sentinel-2 cloud mask orbits.
- add_raster(raster)
Add a raster to the orbit group.
- Parameters:
raster (Sentinel2CloudMask) – The raster to add to the orbit group.
- get_ordered_assets()
Return the assets in the orbit group in ascending order of acquisition date.
- Returns:
The list of sorted assets in the orbit group.
- Return type:
List[AssetVibe]
-
asset_map:
Dict
[str
,str
] A dictionary mapping the asset ID to the acquisition date.
- class vibe_core.data.sentinel.Sentinel2CloudMaskTileSequence(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, categories, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>, write_time_range=<factory>)
Bases:
TileSequence
,Sentinel2CloudMask
Represent a sequence of Sentinel-2 cloud masks for a tile.
- class vibe_core.data.sentinel.Sentinel2CloudProbability(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level)
Bases:
CloudRaster
,Sentinel2Product
Represent a cloud probability raster for a Sentinel-2 product.
- class vibe_core.data.sentinel.Sentinel2Product(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level)
Bases:
SentinelProduct
Represent a Sentinel-2 product metadata.
-
processing_level:
str
The processing level of the Sentinel-2 product.
-
tile_id:
str
The tile ID of the Sentinel-2 product.
-
processing_level:
- class vibe_core.data.sentinel.Sentinel2Raster(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands)
Bases:
Raster
,Sentinel2Product
Represent a raster for a Sentinel-2 product.
- class vibe_core.data.sentinel.Sentinel2RasterOrbitGroup(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, asset_map=<factory>)
Bases:
Sentinel2Raster
Represent a group of Sentinel-2 raster orbits.
- add_raster(raster)
Add a raster to the orbit group.
- Parameters:
raster (Sentinel2Raster) – The raster to add to the orbit group.
- get_ordered_assets()
Return the assets in the orbit group in ascending order of acquisition date.
- Returns:
The list of sorted assets in the orbit group.
- Return type:
List[AssetVibe]
-
asset_map:
Dict
[str
,str
] A dictionary mapping the asset ID to the acquisition date.
- class vibe_core.data.sentinel.Sentinel2RasterTileSequence(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>, write_time_range=<factory>)
Bases:
TileSequence
,Sentinel2Raster
Represent a sequence of Sentinel-2 rasters for a tile.
- class vibe_core.data.sentinel.SentinelProduct(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info)
Bases:
DataVibe
Represent a Sentinel product metadata (does not include the image data).
-
extra_info:
Dict
[str
,Any
] A dictionary with extra information about the Sentinel product.
-
orbit_direction:
str
The orbit direction of the Sentinel product.
-
orbit_number:
int
The orbit number of the Sentinel product.
-
platform:
str
The platform of the Sentinel product.
-
product_name:
str
The name of the Sentinel product.
-
relative_orbit_number:
int
The relative orbit number of the Sentinel product.
-
extra_info:
- class vibe_core.data.sentinel.SentinelRaster(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, bands)
Bases:
Raster
,SentinelProduct
Represent a raster for a Sentinel product.
- class vibe_core.data.sentinel.SpaceEyeRaster(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands)
Bases:
Sentinel2Raster
Represent a SpaceEye raster.
- class vibe_core.data.sentinel.SpaceEyeRasterSequence(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, tile_id, processing_level, bands, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>, write_time_range=<factory>)
Bases:
TileSequence
,SpaceEyeRaster
Represent a sequence of SpaceEye rasters for a tile.
- class vibe_core.data.sentinel.TileSequence(id, time_range, geometry, assets, bands, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>, write_time_range=<factory>)
Bases:
RasterSequence
Represent a sequence of rasters for a tile.
-
write_time_range:
Tuple
[datetime
,datetime
] The time range of the sequence.
-
write_time_range:
- class vibe_core.data.sentinel.TiledSentinel1Product(id, time_range, geometry, assets, product_name, orbit_number, relative_orbit_number, orbit_direction, platform, extra_info, sensor_mode, polarisation_mode, asset_map=<factory>, tile_id='')
Bases:
DownloadedSentinel1Product
Represent a tiled Sentinel-1 product.
-
tile_id:
str
= '' The tile ID of the product.
-
tile_id:
- vibe_core.data.sentinel.discriminator_date(product_name)
Extract the date from a Sentinel-2 product name.
- Parameters:
product_name (str) – The name of the Sentinel-2 product.
- Returns:
The date of the Sentinel-2 product as a datetime object.
- Return type:
datetime
- vibe_core.data.sentinel.ListTileData
A type alias for a list of
TileData
.alias of
List
[Union
[Sentinel1Raster
,Sentinel2Raster
,Sentinel2CloudMask
]]
- vibe_core.data.sentinel.Sequence2Tile = {<class 'vibe_core.data.sentinel.Sentinel1RasterTileSequence'>: <class 'vibe_core.data.sentinel.Sentinel1Raster'>, <class 'vibe_core.data.sentinel.Sentinel2RasterTileSequence'>: <class 'vibe_core.data.sentinel.Sentinel2Raster'>, <class 'vibe_core.data.sentinel.Sentinel2CloudMaskTileSequence'>: <class 'vibe_core.data.sentinel.Sentinel2CloudMask'>, <class 'vibe_core.data.sentinel.SpaceEyeRasterSequence'>: <class 'vibe_core.data.sentinel.SpaceEyeRaster'>}
A dictionary mapping tile sequence data classes to tile data classes.
- vibe_core.data.sentinel.Tile2Sequence = {<class 'vibe_core.data.sentinel.Sentinel1Raster'>: <class 'vibe_core.data.sentinel.Sentinel1RasterTileSequence'>, <class 'vibe_core.data.sentinel.Sentinel2Raster'>: <class 'vibe_core.data.sentinel.Sentinel2RasterTileSequence'>, <class 'vibe_core.data.sentinel.Sentinel2CloudMask'>: <class 'vibe_core.data.sentinel.Sentinel2CloudMaskTileSequence'>}
A dictionary mapping the tile data classes to the tile sequence data classes.
- vibe_core.data.sentinel.TileData
A type alias for any of the tile data classes (
Sentinel1Raster
,Sentinel2Raster
, andSentinel2CloudMask
).alias of
Union
[Sentinel1Raster
,Sentinel2Raster
,Sentinel2CloudMask
]
- vibe_core.data.sentinel.TileSequenceData
A type alias for any of the tile sequence data classes (
Sentinel1RasterTileSequence
,Sentinel2RasterTileSequence
, andSentinel2CloudMaskTileSequence
).alias of
Union
[Sentinel1RasterTileSequence
,Sentinel2RasterTileSequence
,Sentinel2CloudMaskTileSequence
]