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

classDiagram class BaseVibe { } class DataSequence { } class DataVibe { } class DemProduct { } class GNATSGOProduct { } class LandsatProduct { } class NaipProduct { } class CategoricalRaster { } class CloudRaster { } class DemRaster { } class GNATSGORaster { } class LandsatRaster { } class ModisRaster { } class NaipRaster { } class Raster { } class RasterChunk { } class RasterIlluminance { } class RasterSequence { } class SamMaskRaster { } DataSequence --|> DataVibe DataVibe --|> BaseVibe DemProduct --|> DataVibe GNATSGOProduct --|> DataVibe LandsatProduct --|> DataVibe NaipProduct --|> DataVibe CategoricalRaster --|> Raster CloudRaster --|> Raster DemRaster --|> DemProduct DemRaster --|> Raster GNATSGORaster --|> GNATSGOProduct GNATSGORaster --|> Raster LandsatRaster --|> LandsatProduct LandsatRaster --|> Raster ModisRaster --|> Raster NaipRaster --|> NaipProduct NaipRaster --|> Raster Raster --|> DataVibe RasterChunk --|> Raster RasterIlluminance --|> DataVibe RasterSequence --|> DataSequence RasterSequence --|> Raster SamMaskRaster --|> CategoricalRaster

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: Raster

Represent a categorical raster.

class vibe_core.data.rasters.CloudRaster(id, time_range, geometry, assets)

Bases: Raster

Represent a cloud raster.

class vibe_core.data.rasters.DemRaster(id, time_range, geometry, assets, tile_id, resolution, provider, bands)

Bases: Raster, DemProduct

Represent a DEM raster.

class vibe_core.data.rasters.GNATSGORaster(id, time_range, geometry, assets, bands, variable)

Bases: Raster, GNATSGOProduct

Represent a gNATSGO raster of a specific variable.

class vibe_core.data.rasters.LandsatRaster(id, time_range, geometry, assets, bands, tile_id='', asset_map=<factory>)

Bases: LandsatProduct, Raster

Represent a Landsat raster.

class vibe_core.data.rasters.ModisRaster(id, time_range, geometry, assets, bands)

Bases: Raster

Represent a MODIS raster.

class vibe_core.data.rasters.NaipRaster(id, time_range, geometry, assets, tile_id, year, resolution, bands)

Bases: Raster, NaipProduct

Represent a NAIP raster.

class vibe_core.data.rasters.Raster(id, time_range, geometry, assets, bands)

Bases: DataVibe

Represent raster data in FarmVibes.AI.

property raster_asset: AssetVibe

Return the raster asset from the list of assets.

Returns:

The raster asset from the asset list.

Raises:

ValueError – If the raster asset cannot be found in the asset list.

property visualization_asset: AssetVibe

Return the visualization asset from the asset list.

Returns:

The visualization asset from the asset list.

Raises:

ValueError – If the visualization asset cannot be found in the asset list.

class vibe_core.data.rasters.RasterChunk(id, time_range, geometry, assets, bands, chunk_pos, num_chunks, limits, write_rel_limits)

Bases: Raster

Represent a chunk of a raster.

class vibe_core.data.rasters.RasterIlluminance(id, time_range, geometry, assets, illuminance)

Bases: DataVibe

Represent illuminance values for bands of a raster.

class vibe_core.data.rasters.RasterSequence(id, time_range, geometry, assets, bands, asset_order=<factory>, asset_time_range=<factory>, asset_geometry=<factory>)

Bases: DataSequence, Raster

Represent a sequence of rasters.

add_item(item)

Add a raster to the sequence.

Parameters:

item (Raster) – The raster to add to the sequence.

class vibe_core.data.rasters.SamMaskRaster(id, time_range, geometry, assets, bands, categories, mask_score, mask_bbox, chip_window)

Bases: CategoricalRaster

Represent a raster with Segment Anything Model (SAM) masks.

Each asset in the raster contains a mask obtained with SAM.