[Gdal-dev] how to know if GDALOpen(filename,GA_Update) is valid ?
Stephane Routelous
route at cae.com
Mon Oct 4 14:53:02 EDT 2004
Hi,
according to the documentation of GDALOpen, "Many drivers support only read
only access".
How do I know if a driver only has read access ?
Because, if I really need to open a raster in read/write mode, if the driver
does not support write, I need to use a in-memory raster if the driver
supports createcopy.
ex : (pseudo-code)
GDALDataset* ds = GDALOpen(filename,GA_Update); //let's say the driver for
"filename" has only read access
GDALRasterBand* band = ds->GetRasterBand(1);
band->RasterIO( GF_Write,whatever the other parameters are);//here, problem.
Thanks in advance,
Stephane
More information about the Gdal-dev
mailing list