Hi,
I'd like to know which is the best way to know programmatically if a GDAL
driver supports the GDAL Create() and then the writing through RasterIO()
on a subregion
The way I'm trying to figure it now is
...
h = GDALGetDriver(idx);
char** papszMD = GDALGetMetadata(h, nullptr);
if ( CPLFetchBool(papszMD, GDAL_DCAP_RASTER, false) &&
CPLFetchBool(papszMD, GDAL_DCAP_CREATE, false)) {
// OK. Create and RasterIO write supported
}
...
So essentially I'm testing the GDAL_DCAP_CREATE attribute. I've not found
any attribute for testing the driver write capabilities.
For example the above code returns true for VRT driver, but it does not
support writing through VRTSourcedRasterBand.
Thanks,
Calogero
--
Calogero Mauceri
Software Engineer
Applied Coherent Technology Corporation (ACT)
www.actgate.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev