[gdal-dev] FYI - embedding overviews into read only file
Frank Warmerdam
warmerdam at pobox.com
Mon Jan 9 21:15:51 EST 2012
Martin,
In general GDAL is very poor about checking read-only vs. read-write
status. I presume the overviews where in a .ovr file, not in the original
file itself, right?
I will note it is desirable that we can build overviews for files
even if we can only open the files readonly (ie. formats
that don't support update), so I wouldn't want to introduce
careful update permission checking now.
Best regards,
Frank
On Mon, Jan 9, 2012 at 6:03 PM, Martin Chapman <chapmanm at pixia.com> wrote:
> Frank,
>
>
>
> It just dawned on me that yesterday I used the following code to open a
> raster file like so:
>
>
>
> mDataSource = (GDALDataset*) GDALOpen(filePath.c_str(), GA_ReadOnly);
>
>
>
> And then used the GDALDefaultOverviews class to embed some overviews into
> the file. Shouldn’t the API prevent that if I opened the file as read only?
> I initialized the default overviews class using the dataset pointer. I am
> using GDAL 1.8.1. . I used the BuildOverviews() method of the default
> overviews class to execute the process.
>
>
>
> Best regards
>
> Martin
>
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Software Developer
More information about the gdal-dev
mailing list