Skip to main content

Images

Upload hyperspectral imagery, fetch image metadata, attach workspace labels, and download processed image files.

Module methods​

sdk.image exposes:

  • get(image_id): return one ImageResource
  • get_by_ids(image_ids): return a list of resources
  • upload(file_paths, name, folder_id, geotiff_source=None, processing_level=REFLECTANCE): import one HSI file bundle and return its image resource

Pass every required file in file_paths. geotiff_source is optional and is used to identify a GeoTIFF provider such as EnMAP; omit it for non-GeoTIFF imports. The selected processing_level describes the uploaded source data. It labels the values but does not convert or calibrate them.

REFLECTANCE is the method default, not an inference about the file contents. Set processing_level explicitly when the source values represent another level, and verify units and correction provenance before downstream analysis.

A returned image resource does not by itself confirm that background import processing has finished. Confirm the image's import status and available layers in Files before attaching labels or downloading a processed layer.

An ImageResource includes id, name, width, height, and top_processing_level. download(folder_path, correction_level=None) uses the top available level unless you pass a level explicitly.

Example​

from fusion_sdk.models.data_source_enum import DataSourceEnum
from fusion_sdk.models.hsi_processing_level_enum import HsiProcessingLevelEnum

image = sdk.image.upload(
file_paths=[
"/path/to/METADATA.XML",
"/path/to/SPECTRAL_IMAGE.TIF",
],
name="imported_enmap",
folder_id=19,
processing_level=HsiProcessingLevelEnum.RADIANCE,
geotiff_source=DataSourceEnum.ENMAP,
)

# Continue after import processing has finished and the input layer is ready.
image.upload_shapefiles(
workspace_id=8,
shapefile_paths=[
"/path/to/polygon.shp",
"/path/to/polygon.shx",
"/path/to/polygon.dbf",
"/path/to/polygon.prj",
],
)

image.download(
folder_path="/local/downloads",
correction_level=HsiProcessingLevelEnum.RADIANCE,
)

upload_shapefiles and upload_rasters import label sources into the specified workspace for this image; they do not add standalone files to the Files page.