File Loaders#

Raster#

class file_handler.Raster(file_path, name=None, bands=[], id=None)[source]#

Class representing a raster item uploaded by a user from models()

Parameters
  • file_path (str) – Path to the raster file on the local environment.

  • name (str, optional) – Give a name to the raster file, which replaces the default file name in the fused result

    Default: None

  • bands (list, optional) – List of bands from the raster to fuse.

    Default: []

  • id (str, optional) – A unique ID for the layer.

    Default: None

By default, when assigning a raster to the Raster class, all bands are selected and fused when passed. The following types of raster files are supported:

  • Geotiff (.tif or .tiff)

  • GeoPackage (.gpkg)

For an example using a custom raster in fusion, please see the Search and fuse S1 and S2 data with custom raster or vector notebook.

Vector#

class file_handler.Vector(file_path, name=None, interpolation_method=None, attributes=[], exclude_attributes=[], id=None)[source]#

Class representing a vector item uploaded by a user from models()

Parameters
  • file_path (str) – Path to the vector file on the local environment.

  • name (str, optional) – Give a name to the vector file, which replaces the default file name in the fused result.

    Default: None

  • interpolation_method (str, optional) – {‘linear’, ‘nearest’, ‘cubic’} Specify a interpolation method to use when rasterizing the vector file. This option is currently only available for point vector data.

    Default: None

  • attributes (list, optional) – List of attributes from the vector to fuse.

    Default: []

  • exclude_attributes (list, optional) – List of attributes to exclude from the fusion. Attributes not in this list will be fused.

    Default: []

  • id (str, optional) – A unique ID for the layer.

    Default: None

By default, when assigning a vector to the Vector class, all attributes are selected and fused when passed. The following types of vector files are supported:

  • Shapefile (.shp)

  • JSON (.json)

  • GeoJSON (.geojson)

  • GeoPackage (.gpkg)

For an example using a custom vector in fusion, please see the Search and fuse S1 and S2 data with custom raster or vector notebook.