[Gdal-dev] Scaling of heights in gdaladdo
Robert Osfield
robert at openscenegraph.com
Thu Mar 18 16:44:29 EST 2004
Hi All,
I have been testing out my 3D database generation codes on some sample
datasets and have found a few issues with generation of/and using overviews.
The problem can be seen when looking at the min max values before and after
running gdaladdo. For the test below the min/max values start of as 0 and
43929.00 and end up being 0 and 18039 respectively. I would expect a certain
amount rounding, but not reduction by 2.4 times.
The test dataset ps_height_4k.png from the Puget Sound dataset
http://www.cc.gatech.edu/projects/large_models/ps.html
The tests were done with CVS version of gdal, just ater the 1.2 release.
The steps I took are first to convert ps_height_4k.png to a tif to allow
overviews to be generated:
> gdal_translate ps_height_4k.png ps_height_4k.tif
Then check the min max:
> gdalinfo ps_height_4k.tif -mm
Driver: GTiff/GeoTIFF
Size is 4097, 4097
Coordinate System is `'
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 4097.0)
Upper Right ( 4097.0, 0.0)
Lower Right ( 4097.0, 4097.0)
Center ( 2048.5, 2048.5)
Band 1 Block=4097x1 Type=UInt16, ColorInterp=Gray
Computed Min/Max=0.000,43929.000
Then generate the a single overview
> gdaladdo -r average ps_height_4k.tif 2
Then check the min max once more:
> gdalinfo ps_height_4k.tif -mm
Driver: GTiff/GeoTIFF
Size is 4097, 4097
Coordinate System is `'
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 4097.0)
Upper Right ( 4097.0, 0.0)
Lower Right ( 4097.0, 4097.0)
Center ( 2048.5, 2048.5)
Band 1 Block=4097x1 Type=UInt16, ColorInterp=Gray
Computed Min/Max=0.000,18039.000
Overviews: 2049x2049
Is this a bug, feature, something I've done wrong at my end?
Thanks for any help you can provide,
Robert.
More information about the Gdal-dev
mailing list