Products
The vibe_core.data.products module provides a set of classes designed to handle data from remote sensing products, including product metadata and raster data such as Digital Elevation Maps (DEM), National Agricultural Imagery Program (NAIP), Landsat, Sentinel, and more.
Hierarchy
Documentation
Data type and functions definitions related to the products supported in FarmVibes.AI.
- class vibe_core.data.products.AlosProduct(id, time_range, geometry, assets)
Bases:
DataVibeRepresent metadata information about an Advanced Land Observing Satellite (ALOS) product.
- class vibe_core.data.products.BingMapsProduct(id, time_range, geometry, assets, url, zoom_level, imagery_set, map_layer, orientation)
Bases:
DataVibeRepresent metadata of a BingMaps product.
-
imagery_set:
str The imagery set of the product.
-
map_layer:
str The map layer of the product.
-
orientation:
float The orientation of the product.
-
url:
str The download URL of the product.
-
zoom_level:
int The zoom level of the product.
-
imagery_set:
- class vibe_core.data.products.CDLProduct(id, time_range, geometry, assets)
Bases:
DataVibeRepresent metadata information about a Crop Data Layer (CDL) product.
- class vibe_core.data.products.ChirpsProduct(id, time_range, geometry, assets, url)
Bases:
DataVibeRepresent a CHIRPS product.
It contains metadata information about a Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS) product.
-
url:
str The URL of the CHIRPS product.
-
url:
- class vibe_core.data.products.ClimatologyLabProduct(id, time_range, geometry, assets, url, variable)
Bases:
DataVibeRepresent metadata information about a Climatology Lab product.
-
url:
str The URL of the Climatology Lab product.
-
variable:
str The variable of the Climatology Lab product.
-
url:
- class vibe_core.data.products.DemProduct(id, time_range, geometry, assets, tile_id, resolution, provider)
Bases:
DataVibeRepresent metadata information about a Digital Elevation Map (DEM) tile.
The
DemProducttype is the expected output of a list-like operator and the expected input type of a download-like operator.-
provider:
str The provider of the DEM tile.
-
resolution:
int The resolution of the DEM tile.
-
tile_id:
str The tile ID of the DEM tile.
-
provider:
- class vibe_core.data.products.Era5Product(id, time_range, geometry, assets, item_id, var, cds_request=<factory>)
Bases:
DataVibeRepresent metadata information about an ERA5 product.
-
cds_request:
Dict[str,Dict[str,str]] A dictionary with the CDS request parameters.
-
item_id:
str The item ID of the ERA5 product.
-
var:
str The variable of the ERA5 product.
-
cds_request:
- class vibe_core.data.products.EsriLandUseLandCoverProduct(id, time_range, geometry, assets)
Bases:
DataVibeRepresent metadata information about Esri LandUse/LandCover (9-class) dataset.
- class vibe_core.data.products.GEDIProduct(id, time_range, geometry, assets, product_name, start_orbit, stop_orbit, processing_level)
Bases:
DataVibeRepresent a GEDI product.
It contains metadata information about a Global Ecosystem Dynamics Investigation (GEDI) product.
-
processing_level:
str The processing level of the GEDI product.
-
product_name:
str The name of the GEDI product.
-
start_orbit:
int The start orbit of the GEDI product.
-
stop_orbit:
int The stop orbit of the GEDI product.
-
processing_level:
- class vibe_core.data.products.GLADProduct(id, time_range, geometry, assets, url)
Bases:
DataVibeRepresent metadata information about a Global Land Analysis (GLAD) product.
- property tile_name: str
The tile name of the GLAD product.
-
url:
str The URL of the GLAD product.
- class vibe_core.data.products.GNATSGOProduct(id, time_range, geometry, assets)
Bases:
DataVibeRepresent a gNATSGO product.
It contains metadata information about a Gridded National Soil Survey Geographic Database (gNATSGO) product.
- class vibe_core.data.products.HansenProduct(id, time_range, geometry, assets, asset_url=<factory>)
Bases:
DataVibeRepresent metadata information about a Hansen product.
- static extract_hansen_url_property(asset_url, regular_expression, property_name)
Extract the property from the base URL and the tile name.
- Parameters:
asset_url (str) – The URL of the Hansen product.
regular_expression (str) – The regular expression pattern to extract the property.
property_name (str) – The name of the property to extract.
- Returns:
The extracted property.
- Return type:
str
- static extract_last_year(asset_url)
Extract the last year from the base URL and the tile name.
- Parameters:
asset_url (str) – The URL of the Hansen product.
- Returns:
The last year.
- Return type:
int
- static extract_layer_name(asset_url)
Extract the layer name from the base URL and the tile name.
- Parameters:
asset_url (str) – The URL of the Hansen product.
- Returns:
The layer name.
- Return type:
str
- static extract_tile_name(asset_url)
Extract the tile name from the base URL and the tile name.
- Parameters:
asset_url (str) – The URL of the Hansen product.
- Returns:
The tile name.
- Return type:
str
- static extract_version(asset_url)
Extract the version from the base URL and the tile name.
- Parameters:
asset_url (str) – The URL of the Hansen product.
- Returns:
The version.
- Return type:
str
- validate_url()
Validate the Hansen product URL.
- Returns:
bool – True if the URL is valid, False otherwise.
- asset_keys = ['treecover2000', 'gain', 'lossyear', 'datamask', 'first', 'last']
The asset keys (dataset layers) for the Hansen products.
-
asset_url:
str The URL of the Hansen product.
- property last_year: int
The last year of the Hansen product.
- property layer_name: str
The layer name of the Hansen product.
- property tile_name: str
The tile name of the Hansen product.
- property version: str
The version of the Hansen product.
- class vibe_core.data.products.HerbieProduct(id, time_range, geometry, assets, model, product, lead_time_hours, search_text)
Bases:
DataVibeRepresent metadata for a Herbie product.
Note
- For more information on Herbie, see the documentation at
-
lead_time_hours:
int Lead time in hours.
-
model:
str Model name, e.g., ‘hrrr’, ‘hrrrak’, ‘rap’, ‘gfs’, ‘gfs_wave’, ‘rrfs’.
-
product:
str ‘sfc’ (surface fields), ‘prs’ (pressure fields), ‘nat’ (native fields), ‘subh’ (subhourly fields).
- Type:
Product file type
-
search_text:
str Regular expression used to search on GRIB2 Index files.
- class vibe_core.data.products.LandsatProduct(id, time_range, geometry, assets, tile_id='', asset_map=<factory>)
Bases:
DataVibeRepresent metadata information about a Landsat tile.
- add_downloaded_band(band_name, asset_path)
Add a downloaded band to the asset map.
- Parameters:
band_name (str) – The name of the band.
asset_path (str) – The path to the downloaded asset.
- get_downloaded_band(band_name)
Retrieve the downloaded band with the given name from the asset map.
- Parameters:
band_name (str) – The name of the band to retrieve.
- Returns:
The downloaded band with the given name.
- Raises:
ValueError – If the band with the given name is not found or downloaded.
- Return type:
-
asset_map:
Dict[str,str] A dictionary mapping band names to asset IDs.
-
tile_id:
str= '' The tile ID of the Landsat tile.
- class vibe_core.data.products.ModisProduct(id, time_range, geometry, assets, resolution)
Bases:
DataVibeRepresent a MODIS product.
It contains metadata information about a Moderate Resolution Imaging Spectroradiometer (MODIS) product.
-
resolution:
int The resolution of the MODIS product.
-
resolution:
- class vibe_core.data.products.NaipProduct(id, time_range, geometry, assets, tile_id, year, resolution)
Bases:
DataVibeRepresent metadata information about a National Agricultural Imagery Program (NAIP) tile.
The
NaipProducttype is the expected output of a list-like operator and the type of a download-like operator.-
resolution:
float The resolution of the NAIP tile.
-
tile_id:
str The tile ID of the NAIP tile.
-
year:
int The year of the NAIP tile.
-
resolution:
- vibe_core.data.products.CDL_DOWNLOAD_URL
The base URL for downloading CropDataLayer data.