Rasters
The classes and methods defined by vibe_core.data.rasters module handle raster data related to remote sensing products and other geospatial data types. The base class in the module is Raster, which provides properties and methods for working with raster data, such as accessing raster and visualization assets. The module also includes specialized classes for different derived types, such as DemRaster, NaipRaster, LandsatRaster, and GNATSGORaster, which inherit from both the Raster class and their respective product metadata classes from vibe_core.data.products.
Additionally, the module provides classes for handling raster sequences (RasterSequence), raster chunks (RasterChunk), categorical rasters (CategoricalRaster), among others.
Hierarchy
Documentation
Data types, constants, and supporting functions for manipulating rasters in FarmVibes.AI.
- class vibe_core.data.rasters.CategoricalRaster(id, time_range, geometry, assets, bands, categories)
Bases:
RasterRepresent a categorical raster.
-
categories:
List[str] The list of categories in the raster.
-
categories:
- class vibe_core.data.rasters.CloudRaster(id, time_range, geometry, assets)
Bases:
RasterRepresent a cloud raster.
-
bands:
Dict[str,int] A dictionary with the name of each band and its index in the raster data.
-
bands:
- class vibe_core.data.rasters.DemRaster(id, time_range, geometry, assets, tile_id, resolution, provider, bands)
Bases:
Raster,DemProductRepresent a DEM raster.
- class vibe_core.data.rasters.GNATSGORaster(id, time_range, geometry, assets, bands, variable)
Bases:
Raster,GNATSGOProductRepresent a gNATSGO raster of a specific variable.
-
variable:
str The variable represented in the raster.
-
variable:
- class vibe_core.data.rasters.LandsatRaster(id, time_range, geometry, assets, bands, tile_id='', asset_map=<factory>)
Bases:
LandsatProduct,RasterRepresent a Landsat raster.
- class vibe_core.data.rasters.ModisRaster(id, time_range, geometry, assets, bands)
Bases:
RasterRepresent a MODIS raster.
- class vibe_core.data.rasters.NaipRaster(id, time_range, geometry, assets, tile_id, year, resolution, bands)
Bases:
Raster,NaipProductRepresent a NAIP raster.
- class vibe_core.data.rasters.Raster(id, time_range, geometry, assets, bands)
Bases:
DataVibeRepresent raster data in FarmVibes.AI.
-
bands:
Dict[str,int] A dictionary with the name of each band and its index in the raster data.
-
bands:
- class vibe_core.data.rasters.RasterChunk(id, time_range, geometry, assets, bands, chunk_pos, num_chunks, limits, write_rel_limits)
Bases:
RasterRepresent a chunk of a raster.
-
chunk_pos:
Tuple[int,int] The position of the chunk in the raster data, as a tuple of (column, row) indices.
-
limits:
Tuple[int,int,int,int] The limits of the chunk in the raster data, as a
ChunkLimitsobject. These are indices, not coordinates.
-
num_chunks:
Tuple[int,int] The total number of chunks in the raster data, as a tuple of (number of columns, number of rows).
-
write_rel_limits:
Tuple[int,int,int,int] The relative limits of the chunk in the raster data asset. These are non-overlapping indices that are used to write the chunk to the asset.
-
chunk_pos:
- class vibe_core.data.rasters.RasterIlluminance(id, time_range, geometry, assets, illuminance)
Bases:
DataVibeRepresent illuminance values for bands of a raster.
-
illuminance:
List[float] The list of illuminance values for each band.
-
illuminance:
- class vibe_core.data.rasters.RasterSequence(id, time_range, geometry, assets, bands, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>)
Bases:
DataSequence,RasterRepresent a sequence of rasters.
- class vibe_core.data.rasters.SamMaskRaster(id, time_range, geometry, assets, bands, categories, mask_score, mask_bbox, chip_window)
Bases:
CategoricalRasterRepresent a raster with Segment Anything Model (SAM) masks.
Each asset in the raster contains a mask obtained with SAM.
-
chip_window:
Tuple[float,float,float,float] The chip window (col_offset, row_offset, width, height) covered by this raster.
-
mask_bbox:
List[Tuple[float,float,float,float]] The list of bounding boxes for each mask in the assets.
-
mask_score:
List[float] The list of SAM quality scores for each mask in the assets.
-
chip_window:
- vibe_core.data.rasters.ChunkLimits
Type alias for chunk limits. Tuple of col_offset, row_offset, width, height.
alias of
Tuple[int,int,int,int]