Expand description
GDAL utility functions for raster processing. GDAL utility functions for raster processing.
This module provides helper functions for GDAL command-line operations including warping, translating, creating VRTs, and mosaic building.
Structsยง
- Basic
Raster Info - Basic metadata extracted from a single GDAL dataset open.
Functionsยง
- change_
res ๐ - Changes the resolution of a raster source.
- compute_
raster_ union_ extent - Compute the union extent of multiple raster files in the target CRS.
- compute_
single_ ๐raster_ extent - Compute the extent of a single raster file in the target CRS.
- compute_
vector_ extent - Compute the extent of a vector layer in the target CRS.
- create_
rayon_ pool - Creates a rayon ThreadPool with the given number of CPUs.
- create_
temp_ file - Creates a temporary file with the given extension.
- extract_
band ๐ - Extracts a single band from a raster source into a VRT.
- file_
stem_ str - Extracts the file stem as a
&strfrom a path. - get_
class - Gets class IDs from a vector dataset.
- get_
widest_ ๐type - Returns the widest GDAL data type among all raster bands in the dataset.
- mosaic
- Creates a mosaic from multiple raster files.
- mosaic_
keep_ inputs - Mosaics multiple raster files into a single output WITHOUT deleting inputs.
Unlike
mosaic_translate_cleanup, this preserves the input files. - mosaic_
translate_ cleanup - Assembles processed block files into a final output via mosaic + translate + cleanup.
- mosaic_
translate_ cleanup_ time_ steps - Assembles time-step block files into a final output via mosaic + translate + cleanup.
- open_
for_ update - Opens a GDAL dataset with update access.
- raster_
from_ size - Creates an empty raster file with the given size and properties.
- read_
basic_ raster_ info - Opens a raster dataset once and extracts all basic metadata fields.
- read_
raster_ band - Reads a raster band window into a 2D array.
- run_
gdal_ command - Runs a GDAL command-line tool with the given arguments.
- translate
- Translates a raster file to GeoTIFF format.
- translate_
to_ cog - Translates an existing GeoTIFF to a Cloud Optimized GeoTIFF.
- translate_
with_ driver - Translates a raster file to a different format using the specified driver.
- warp ๐
- Warps a raster source to a different EPSG projection.
- warp_
with_ ๐te_ tr - Warps a raster source to a different extent and resolution.
- write_
bands_ to_ file - Writes each band of a 3D array to a GDAL dataset.