[gdal-dev] Re: storing height information in a .tif rather the
grayscale in the tif relying on another file
Frank Warmerdam
warmerdam at pobox.com
Tue Feb 23 14:12:56 EST 2010
anotherObject wrote:
> Sorry for not being clearer: I started off with a a 32bit tif - however, im
> not sure how I can tell if it has an associated color table.
Ytrapaet,
Try running gdalinfo against the file and seeing what it reports. Including
a gdalinfo report with your email would make it much easier for us to
give a meaningful reply.
> Are there both types of tifs? if so how can I convert from one to the other?
There are many types of TIFF files. TIFF supports a wide variety of color
models, pixel data types and numbers of bands.
> What I do know is that when the 32bit elevation model is viewed through
> ArcGIS, its default setting was on "standard deviation stretch". If I change
> it to "none", it gives the correct elevation values. However, this seems to
> only be a display setting;
You are correct - this is a display setting in ArcGIS and does not
reflect some fundamental nature of the file.
> when I converted the 32 to 8bit using
> gdal_translate (which is the same as your example), the resulting 8bit image
> did not have any stretching when I viewed it in ArcGIS. However,the
> conversion did produce my8bit.tif along with my8bit.aux.xml.
>
> Normally, when i open images in photoshop, i only plan to loose the
> georeferencing information, however, it seems that when i open my8bit.tif, i
> also loose the proper colors. I think this is because the color information
> is stored in the .aux.xml file, but I dont know how to produce a .tif that
> is any different (that does not have a .aux.xml file)
What colors do you see? Just a range of greys? Once again, you speak
of "proper colors", but I will claim there is no inherent colors involved.
Perhaps you just mean it is using a stretch or display mode that does not
meet your expectations or wishes.
>> Note that raw DEM data has no inherent coloring so it doesn't really mean
>> anything to say "so that the actual .tif grayscale colors are not
>> stretched
>> at all" in this context.
>
> I tryed converting my 8bit.tif to 8bit.raw,
Two issues. First, when I said raw I wasn't so much speaking of a file
format, but rather of "dem data as typically provided by data providers
before being processed into special visualization form, like a shaded
relief". Second, gdal_translate does *not* decide on file format based
on file extensions, so you just produced a TIFF that happened to have
the extension .raw.
> then back to an 8 bit.tif, but i
> still always end up with a .aux.xml file even with the .raw route. In other
> words, any method I try, I always end up with an image that is correctly
> seen my GIS programs, but incorrectly seen by photoshop. I need the correct
> grayscale in photoshop so that I can interactively make new RGB color
> gradients that use the elevation informaiton. I am definitely missing a
> concept somewhere along the way... The way I see it, its the .aux.xml file
> about color that I want embedded into the .tif instead. Is this what is
> meant by "applying a color table"?
I don't know what photoshop does, and you haven't given any details on the
nature of the file (such as a gdalinfo or tiffinfo report). I am really
not sure I can help you since the issues seem mostly to be "how do I get
photoshop to display things the way I hope it will", and this isn't a
photoshop mailing list.
Best regards,
--
---------------------------------------+--------------------------------------
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 Programmer for Rent
More information about the gdal-dev
mailing list