Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Gdal Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-gdal-knowledge-patch)
---
name: gdal-knowledge-patch
description: GDAL
version: "3.13.2"
license: MIT
metadata:
author: Nevaberry
---
# GDAL compatibility guidance
Load this skill when migrating GDAL applications or drivers, updating command-line workflows,
or working with raster, vector, multidimensional, cloud, and language-binding behavior.
Use the topic references for detailed conditions, driver options, and examples.
## Reference index
| Reference | Topics |
| --- | --- |
| [Migration and API compatibility](references/migration-and-api.md) | Driver overrides, removed interfaces, lifecycle, CRS transformations, geometry, schemas, raster buffers |
| [Commands and pipelines](references/commands-and-pipelines.md) | CLI migration, algorithms, nested pipelines, inspection, raster calculations, tiling, vector processing |
| [Cloud, VSI, builds, and bindings](references/cloud-vsi-build-and-bindings.md) | Build dependencies, packages, configuration, HTTP, credentials, archives, Python, C#, Java |
| [Raster processing and formats](references/raster-processing-and-formats.md) | Warping, masks, VRT, GTI, STAC, GeoTIFF, COG, imagery, raster databases, map services |
| [Vector and database workflows](references/vector-and-database-workflows.md) | SQL, Arrow, Parquet, ADBC, GeoPackage, PostGIS, geodatabases, vector formats and services |
| [Multidimensional and scientific data](references/multidimensional-and-scientific.md) | Array APIs, netCDF, HDF, Zarr, GRIB, S-100, BAG, planetary and satellite products, TileDB |
## Breaking changes and deprecations
### CLI and scripting compatibility
Call `buffer`, `explode-collections`, `make-valid`, `segmentize`, `simplify`, and `swap-xy` directly
under `gdal vector`. Their old `gdal vector geom` paths still work in 3.12 and are removed in 3.13.
Replace `gdal vector geom set-type` with `gdal vector set-geom-type`.
The `gdal` CLI writes progress bars to standard output by default. Pass `--quiet` or `-q` when a
script needs output without the progress bar.
`gdal raster info`, `gdal vector info`, and `gdal vsi list` default to text when called from the CLI
and to JSON when called through the API. Scripts that parse JSON should request it explicitly.
```sh
gdal raster info --format=json input.tif
```
### Driver overrides and return values
`OGRLayer::SetSpatialFilter()` and `SetSpatialFilterRect()` are nonvirtual public methods that
return `OGRErr` and validate any supplied geometry-field index. Pass a `const OGRGeometry *` for
geometry filters, check the return value, and move driver overrides to the protected
`ISetSpatialFilter(int, const OGRGeometry *)` hook.
In GDAL 3.12, raster driver subclasses need a trailing `const` on the geotransform getter override.
Use these declarations in a `GDALDataset` subclass. `GDALGeoTransform` wraps a
`std::array<double, 6>` and replaces the six-double pointer parameter in both virtual methods.
```cpp
CPLErr GetGeoTransform(GDALGeoTransform >) const override;
CPLErr SetGeoTransform(const GDALGeoTransform >) override;
```
Update out-of-tree `GDALDataset::Close()` overrides to take `GDALProgressFunc pfnProgress` and
`void *pProgressData`. Both parameters accept `nullptr`, as in `dataset->Close(nullptr, nullptr)`.
`GDALMajorObject::GetMetadata()` and `GDALGetMetadata()` now return `CSLConstList`, so use it in
place of `char **` for variables that store their results, including in builds against earlier GDAL
releases. `GDALMajorObject::SetMetadata()` now takes `CSLConstList` and still accepts mutable lists.
```cpp
CSLConstList metadata = dataset->GetMetadata();
```
### Raster buffers and raw VRT access
Resampling now operates in the output buffer type by default, so a non-nearest `RasterIO()` read of
a Byte band into a Float32 buffer can return fractional values. To disable buffer-type resampling,
pass an initialized `GDALRasterIOExtraArg` with `bOperateInBufType` set to `false`.
```cpp
GDALRasterIOExtraArg args;
INIT_RASTERIO_EXTRA_ARG(args);
args.bOperateInBufType = false;
```
GDAL restricts raw file access by `VRTRawRasterBand` by default. If an existing VRT can no longer
open its raw source, check the access rules in the `vrtrawrasterband_restricted_access`
documentation.
Set the CMake option `-DGDAL_VRT_ENABLE_RAWRASTERBAND=OFF` to build without raw VRT bands. In a
build that includes them, set the runtime option `GDAL_VRT_ENABLE_RAWRASTERBAND=NO` to disable them.
### Memory datasets and cleanup interfaces
`Memory` is a deprecated alias for `MEM`, which now supports vector, raster, and multidimensional
datasets. In Python, create an in-memory vector dataset with
`gdal.GetDriverByName("MEM").CreateVector("")`.
GDAL 3.10.0 deprecates `GDALDestroyDriverManager()` and `OGRCleanupAll()`. Update applications that
call these entry points at shutdown.
## Commands and pipelines
`gdal pipeline` can combine raster and vector steps, nest pipelines, and use `tee` to run a branch
while the main pipeline continues. An existing pipeline can be run with added or overridden
parameters.
A raster pipeline can start with `mosaic` or `stack` and use `fill-nodata`, `proximity`, `sieve`,
`viewshed`, or `overview add` as steps. `tile` can end a raster pipeline, and `info` can end a
raster or vector pipeline.
The Python bindings generate the `gdal.alg` module from the algorithm registry. Call commands by
their group and name using keyword arguments.
```python
from osgeo import gdal
gdal.alg.raster.convert(input="in.tif", output="out.tif")
```
Place `_` in a step's input list to use the previous step's dataset in that position. This lets a
step consume the previous result as its second or later input.
Call `GDALAlgorithm::Run()` at most once per instance. C API consumers can query pipeline
availability with `GDALAlgorithmArgIsAvailableInPipelineStep()` and dependencies with
`GDALAlgorithmGetArgDependencies()`, `GDALAlgorithmArgGetDirectDependencies()`, and
`GDALAlgorithmArgGetMutualDependencyGroup()`.
## Raster processing and output
`gdal_translate` copies source nodata only if the output data type can represent that value exactly.
Check the output metadata when converting to a narrower type.
The COG driver accepts `INTERLEAVE=BAND` and `INTERLEAVE=TILE` at creation. For example, run
`gdal_translate -of COG -co INTERLEAVE=TILE input.tif output.tif`.
`gdal raster reproject` defaults to `ALL_CPUS` for `--num-threads`. Use `-j 1` to request a single
thread.
When a warp source has nodata and a per-dataset mask, the warper uses the nodata value, ignores the
mask, and emits a warning.
Use `gdal raster zonal-stats` to summarize raster cell values by zone. Use `gdal raster as-features`
when you need raster pixels as vector features for subsequent vector processing.
`gdal raster calc` handles nodata and adds `--flatten`. Use `--dialect=builtin` to compute one band
from all bands of a single input, or select `--dialect=muparser` for muparser expressions.
## Vector translation and storage
Pass `DATETIME_AS_STRING=YES` to `OGRLayer::GetArrowStream()` to request date-time strings.
`ogr2ogr` uses this option on the Arrow path from GeoPackage and FlatGeobuf to preserve the source
time zone.
The `FileGDB` driver delegates creation and update operations to `OpenFileGDB`. Use the OpenFileGDB
layer creation option `CREATE_MULTIPATCH=YES` for compatibility with the FileGDB multipatch writer.
The Parquet driver supports opening datasets for update and adds the `COMPRESSION_LEVEL` layer
creation option. With libarrow 21 or later it can read and write the Parquet `GEOMETRY` type.
`ogr2ogr` fails if it cannot create an output field unless error skipping is enabled. Both `ogr2ogr`
and `gdal vector convert` warn when the output driver lacks support for curve, Z, or M geometries,
unless quiet mode is enabled.
## Cloud and virtual filesystems
Set the path-specific option `VSICURL_QUERY_STRING` to supply a query string for a `/vsicurl/` path.
In the `/vsicurl?` form, pass per-request headers as `header.<name>=<value>`, for example
`gdalinfo '/vsicurl?url=https%3A%2F%2Fexample.org%2Fimage.tif&header.X-Request-ID=test'`.
`/vsis3/` supports directory buckets and the `credential_process` setting in an S3 credentials
profile.
Object storage handlers such as `/vsis3/`, `/vsigs/`, and `/vsiaz/` normalize `/./` and `/../` path
segments by default. Set `GDAL_HTTP_PATH_VERBATIM=YES` when a request must preserve the literal
path.
Use `osgeo.gdal.VSIFile` to access a GDAL virtual file from Python. Import `osgeo.gdal_fsspec` to
register the VSI filesystem handlers with fsspec.
## Multidimensional data
In netCDF and Zarr, `LIST_ALL_ARRAYS` defaults to `NO`. Open with `-oo LIST_ALL_ARRAYS=YES` to
request the full array list, for example `gdalinfo -oo LIST_ALL_ARRAYS=YES input.nc`.
The Zarr driver can open Kerchunk reference stores in either JSON or Parquet form.
The driver can read, update, and create v3 consolidated metadata. It reads and writes the
`sharding_indexed` and `crc32c` codecs and `vlen-utf8` strings. It recognizes the NumPy `datetime64`
and `timedelta64` extension types.
The Zarr driver can open `.zarray`, `.zgroup`, `.zmetadata`, and `zarr.json` files directly. Check
the return value of `Close()` for write failures.