Rasters
Een Cloud Optimized GeoTIFF schrijven · create_cog_file
waterlagen.raster.create_cog_file
create_cog_file(
vrt_file,
cog_file,
*,
overwrite=False,
show_progress=True,
overview_resampling="nearest",
floating_point_predictor=False,
regenerate_overviews=False,
raster_attribute_table=None,
)
Create a Cloud Optimized GeoTIFF directly from a VRT file.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
pathlib.Path
|
Written or reused COG. |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
vrt_file
|
pathlib.Path
|
Input VRT and output COG. |
Verplicht |
cog_file
|
pathlib.Path
|
Input VRT and output COG. |
Verplicht |
overwrite
|
bool
|
Replace an existing COG only after successful validation. |
False
|
show_progress
|
bool
|
Show GDAL conversion progress. |
True
|
overview_resampling
|
(nearest, average)
|
Overview resampling; use nearest for IDs/classes, average for elevation. |
"nearest"
|
floating_point_predictor
|
bool
|
Use ZSTD floating-point prediction for the raster and overviews. |
False
|
regenerate_overviews
|
bool
|
Build new overviews from full-resolution values instead of copying them. |
False
|
raster_attribute_table
|
osgeo.gdal.RasterAttributeTable
|
Embed this RAT during creation (GDAL >= 3.12), validating without PAM. |
None
|
Een virtueel rastermozaïek maken · create_vrt_file
waterlagen.raster.create_vrt_file
create_vrt_file(vrt_file, directory=None, *, files=None)
Create a mosaic, with later sources taking precedence over earlier ones.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
pathlib.Path
|
Destination VRT. |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
vrt_file
|
pathlib.Path
|
Destination VRT. |
Verplicht |
directory
|
pathlib.Path or list of pathlib.Path
|
Directories containing TIFFs, in priority order. |
None
|
files
|
list of pathlib.Path
|
Explicit ordered sources, mutually exclusive with |
None
|
Rasterkenmerken bekijken · inspect_raster
waterlagen.raster.inspect_raster
inspect_raster(file)
Toon onder meer rasterafmetingen, bandtypen en overzichten in het log.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
None
|
De rasterkenmerken verschijnen in het log. |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
file
|
pathlib.Path
|
Pad naar het te inspecteren raster. |
Verplicht |
Bronbestanden van een VRT opvragen · list_tif_files_in_vrt_file
waterlagen.raster.list_tif_files_in_vrt_file
list_tif_files_in_vrt_file(vrt_file)
Vraag de bronbestanden van een VRT op.
Wat krijgt u terug?
| Type | Betekenis |
|---|---|
list[pathlib.Path]
|
De bestanden waar het mozaïek naar verwijst, zonder het VRT-bestand zelf. |
Instellingen en invoer
| Naam | Type | Betekenis | Standaardwaarde |
|---|---|---|---|
vrt_file
|
pathlib.Path
|
Pad naar het virtuele rastermozaïek. |
Verplicht |
Redactie: AI