gedih3.raster.config#
Raster Module Configuration
This module defines constants and defaults for raster output operations including GeoTIFF compression, tiling, and format settings.
Attributes#
Functions#
|
Generate rasterio GeoTIFF export options. |
|
Generate rasterio creation options for the GDAL COG driver. |
|
Check if a format string indicates raster output. |
Module Contents#
- gedih3.raster.config.COMPRESSION_OPTIONS = ['LZW', 'ZSTD', 'DEFLATE', 'PACKBITS', 'NONE']#
- gedih3.raster.config.RASTER_FORMATS = ['tif', 'tiff', 'geotiff', 'nc', 'netcdf']#
- gedih3.raster.config.TIME_UNITS = ['years', 'months', 'weeks', 'days']#
- gedih3.raster.config.H3_RASTER_CRS = 'EPSG:4326'#
- gedih3.raster.config.GEDI_START_DATE_STR = '2018-01-01'#
- gedih3.raster.config.get_geotiff_options(compress: str = 'LZW', tiled: bool = True, blocksize: int = 256, bigtiff: bool = True) Dict[str, Any][source]#
Generate rasterio GeoTIFF export options.
- Parameters:
- compressstr
Compression method (‘LZW’, ‘ZSTD’, ‘DEFLATE’, ‘PACKBITS’, ‘NONE’)
- tiledbool
Use tiled output format
- blocksizeint
Tile block size in pixels
- bigtiffbool
Use BigTIFF format for large files
- Returns:
- dict
Options dictionary for rio.to_raster()
- gedih3.raster.config.get_cog_options(compress: str = 'LZW', blocksize: int = 256, bigtiff: bool = True, overviews: str = 'AUTO', resampling: str = 'AVERAGE') Dict[str, Any][source]#
Generate rasterio creation options for the GDAL COG driver.
The COG driver takes its own option names —
BLOCKSIZErather thanTILED/BLOCKXSIZE, and it is always tiled. Passing the GeoTIFF option names instead is silently ignored and you get the driver defaults (512-pixel blocks), which is why this is a separate builder rather than a flag onget_geotiff_options().- Parameters:
- compressstr
Compression method (‘LZW’, ‘ZSTD’, ‘DEFLATE’, ‘PACKBITS’, ‘NONE’)
- blocksizeint
Internal tile size in pixels
- bigtiffbool
Use BigTIFF for large files
- overviewsstr
COG
OVERVIEWSpolicy — ‘AUTO’ builds the pyramid when the image is larger than one block, ‘NONE’ skips it- resamplingstr
Resampling used to build the overviews
- Returns:
- dict
Options for
rio.to_raster(), includingdriver='COG'