urbanlc.utils.export_geotiff#

urbanlc.utils.export_geotiff(img: ndarray, save_path: str, output_meta: Dict[str, Any], compress: Optional[str] = None, tiled: Optional[bool] = True, blockxsize: Optional[int] = 256, blockysize: Optional[int] = 256, interleave: Optional[str] = 'band') None#

Export a NumPy array as a GeoTIFF file.

This function exports a NumPy array as a GeoTIFF file specified with the provided metadata. Compression, tiling, and block size options can be customized.

Parameters:
  • img (np.ndarray) – Input data to be exported.

  • save_path (str) – File path to save the GeoTIFF file.

  • output_meta (Dict[str, Any]) – Metadata dictionary for the GeoTIFF file.

  • compress (str, optional) – Compression method for the GeoTIFF file. Defaults to None.

  • tiled (bool, optional) – Whether to use tiled format for the GeoTIFF file. Defaults to True.

  • blockxsize (int, optional) – Block size for x-dimension. Defaults to 256.

  • blockysize (int, optional) – Block size for y-dimension. Defaults to 256.

  • interleave (str, optional) – Interleave format for the GeoTIFF file. Defaults to “band”.

Returns:

None