[gdal-dev] GDAL can't read values from new raster dataset, but Global Mapper can
CDelancy
cdelancy at blackfangtechnologies.com
Mon Sep 30 03:42:32 PDT 2019
Hello. I am using GDAL 3 in a c++ project. I have found that GDAL does not
seem to properly read values from raster datasets that it has created. For
example, if I create a new raster dataset with one band and read the min and
max values from that band, it always returns -4294967295.0 and 4294967295.0.
If I fill the band with 0, it still returns -4294967295.0 and 4294967295.0.
If I write to it from a dataset that I have opened from file using a chunk
and warp operation, it still returns those values.
I have tried using both the Mem and GeoTiff drivers. However, if I use the
GeoTiff driver, I can open the resulting file on disk with Global Mapper.
When I copy the projection and geotransform from a source dataset to this
one, and then perform a warp, GDAL still reads -4294967295.0 and
4294967295.0 as the min and max. Strangely, in Global Mapper, it is exactly
as I would expect, demonstrating that the warp operation worked, at least to
some extent. The elevation values match the original file, and it is
properly georeferenced.
Does anyone have any suggestions I could look into to explain this behavior?
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
More information about the gdal-dev
mailing list