environmentaltools.spatiotemporal.raster.save_layer

environmentaltools.spatiotemporal.raster.save_layer(records, info)[source]

Save a set of geometry records as a spatial layer (GeoPackage or Shapefile).

Converts a list of geometry records into a GeoDataFrame, assigns the correct CRS, and writes the layer to disk. The output format is determined by the GPKG_ACTIVE flag: if True, writes to a GeoPackage (GPKG); otherwise, writes to an ESRI Shapefile.

Parameters:
  • records (list of dict) – List of records, each containing geometry and attribute data for the layer.

  • info (dict) – Configuration dictionary containing output directory, CRS, and layer name (index).

Returns:

The function writes files to disk and does not return a value.

Return type:

None