Opened 20 years ago

Closed 14 years ago

#627 closed defect (fixed)

no way to know if a raster accepts GL_Update in GDALOpen

Reported by: route@… Owned by: 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

Change History (1)

comment:1 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

I've recently made a pass on most drivers to ensure that the read-only ones return NULL when GDALOpen'ing in update mode.

Note: See TracTickets for help on using tickets.