Ticket #627 (new defect)

Opened 4 years ago

no way to know if a raster accepts GL_Update in GDALOpen

Reported by: route@cae.com Assigned to: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: major Keywords:
Cc:

Description

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