[gdal-dev] Re: storing height information in a .tif rather the grayscale in the tif relying on another file

anotherObject ytrapaet at hotmail.com
Tue Feb 23 18:14:05 EST 2010


Thanks for your patience,

The metadata about my file is wrong because it is the metadata from the
deriving 32 bit file. If I calculate the statistics of my new 8 bit file
(which i do in ArcGIS, i dont know if GDAL does this?), then the statistics
are correct, but ArcGIS also applies a standard deviation stretch to the
display of the grayscale, which I do not want and cannot undo. For some
reason calculate statistics in ArcGIS by default stetches the color display.
 
that said, below is info about both versions of the 8 bit file:

A) 8bitfile with wrong metadata (but right color display in ArcGIS)

C:\>gdalinfo -nomd -stats M:\GIS_data\a_temp\globe8b_nostats.tif
Driver: GTiff/GeoTIFF
Files: M:\GIS_data\a_temp\globe8b_nostats.tif
       M:\GIS_data\a_temp\globe8b_nostats.aux
       M:\GIS_data\a_temp\globe8b_nostats.tif.aux.xml
Size is 10800, 5400
Coordinate System is `'
Origin = (-180.008333333340000,90.008333369334991)
Pixel Size = (0.033334876549877,-0.033336419759754)
Corner Coordinates:
Upper Left  (-180.0083333,  90.0083334)
Lower Left  (-180.0083333, -90.0083333)
Upper Right ( 180.0083334,  90.0083334)
Lower Right ( 180.0083334, -90.0083333)
Center      (   0.0000000,   0.0000000)
Band 1 Block=10800x1 Type=Byte, ColorInterp=Gray
  Min=-10898.000 Max=7966.000
  Minimum=-10898.000, Maximum=7966.000, Mean=-1892.469, StdDev=2650.051
  NoData Value=-3.4028234663852886e+038


A) 8bitfile with right metadata (but wrong color display in ArcGIS)

C:\>gdalinfo -nomd -stats M:\GIS_data\a_temp\globe8b_stats.tif
Driver: GTiff/GeoTIFF
Files: M:\GIS_data\a_temp\globe8b_stats.tif
       M:\GIS_data\a_temp\globe8b_stats.aux
Size is 10800, 5400
Coordinate System is `'
Origin = (-180.008333333340000,90.008333369334991)
Pixel Size = (0.033334876549877,-0.033336419759754)
Corner Coordinates:
Upper Left  (-180.0083333,  90.0083334)
Lower Left  (-180.0083333, -90.0083333)
Upper Right ( 180.0083334,  90.0083334)
Lower Right ( 180.0083334, -90.0083333)
Center      (   0.0000000,   0.0000000)
Band 1 Block=10800x1 Type=Byte, ColorInterp=Gray
  Min=1.000 Max=255.000
  Minimum=1.000, Maximum=255.000, Mean=121.757, StdDev=35.684
  NoData Value=-3.4028234663852886e+038


To restate my goal, I want to somehow export an 8bit image that precisely
(with no stretching) keeps grayscale elevation values in one image file (a
tif, jpg or png...), preferably with no .aux files, so that there are no
complications when reading the image with non-GIS software.

Is there some export or create  function that I should use for this goal
with pythonwin+GDAL? Perhaps I just need an infusion of new terms, I do not
know how do describe what I am trying to do in more technical terms that
might be useful for searching for solutions. More and more I somehow thing
that numpy+PIL might be a better route, although I started with GDAL because
I thought it would be an easier route that is also more useful in the long
run. thanks!


-- 
View this message in context: http://n2.nabble.com/storing-height-information-in-a-tif-rather-the-grayscale-in-the-tif-relying-on-another-file-tp4617873p4622532.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list