[Mapserver-users] GeoTIFF Summary
becker at iwk.uka.de
Wed Feb 18 16:56:18 EST 2004
I am new to this list and relatively new to mapserver. Please excuse me for flooding you with
questions but I would like to summarize and check what I know about GeoTIFF in Mapserver. I have
already checked the FAQ and the mailing list archieve but I am still a bit confused.
I have a nice GeoTIFF image with 3 bands. Its name is "tct.tif" (with coord. file "tct.tfw"). I
would like to display it with mapserver but several problems arise.
Could you please comment on the following statements (S) and question (Q) to help clearify my mind:
According to Frank Warmerdam,
it is true that ...
S1) ... all raster data are mapped (classified) to 0..255 before drawing (drawGDAL()).
Q1) How are the 3 bands with 256 values each mapped to one dimension, i.e. 0-255, by mapserver?
S2) ... values above 255 are clipped to 255.
S3) ... one solution is to preprocess data before feeding into mapserver.
S4) ... a second solution is to use the PROCESSING directive in the map-file.
Q2) Are these the only solutions?
Q3) Is it possible to set exact one class (e.g. [pixel]=255) to transparent (unvisible)?
Q4) Without an explicit classification in the map-file (CLASS ... END) the TIFF looks nice in its
default colors, which looks like an implicit classification to me. If I introduce one explicit class
which does not cover the whole value range (co-domain) of the pixel values, e.g. [pixel]<10, I will
have to explicitly classify the rest of the values (>=10), otherwise pixels with unclassified values
won't be drawn. Is this correct? Is it possible to classify only part of the values and to use the
default (implicit) classification for the rest?
Q5) My GeoTIFF (tct.tif, tct.tfw, with 3 bands) is drawn with this piece of map-file code:
in perfect colors!!! Very nice.
The same file will not appear if I use the following code:
Q6) If I use the map-file fragment
I will get a gray scale image which is deemed to be band 2 of the GeoTIFF (who knows :).
But what is the directive PROCESSING "BANDS=1,2,3" for? Isn't it worthless? It simply crashes the
application with the following warning:
Warning: [MapServer Error]: drawGDAL(): Attempt to classify 24bit image, this is unsupported.
Q7) What is planned in future concerning the current classification scheme?
Q8) Will floating point values for rasters be supported?
Q9) Somewhere in the mail archieve I stumbled across a trick how to query data from raster data but
I can't find it anymore. Could you please give me a hint or the url?
Q10) What about an update of the FAQ?
Thank you very much for your patience.
This posting is long and maybe annoying but I would be nice if you helped me clearing my confusion.
More information about the mapserver-users