[Mapserver-users] Tiff problems
Frank Warmerdam
warmerdam at pobox.com
Fri Oct 24 13:08:09 PDT 2003
Raymond E. Flanery, Jr. wrote:
> I am running mapserver 4.1 and am having the following problems I have
> 3 geotiff files, one is 8bit data, one 16 bit data and one is 32 bit
> data (I will not get into the 32 bit data here). I can view the
> geotiffs in openev just fine, and passing the cursor over the images
> shows what appear to be the correct data values. However, mapserver
> appears to be cutting off the data values in the 16 bit geotiff to a max
> of 255. I have used CLASS objects in the LAYER object to define color
> bands for the dataset, and everything looks correct up to the 5^th band
> ([pixel] >= 201 AND [pixel] <= 500),exept that everything in the dataset
> that should have a data value between 201 and 8700 is all colored
> according to that 5^th band.
Ray,
Sorry ... it is a known limitation of the MapServer raster support (at
least as done via GDAL) that it premaps the data to 8bit before apply the
classification. The alternative would involved evaluating the classification
expressions against each pixel (very expensive) as opposed to the current
approach of compute the classification result for all values from 0-255 and
then applying the result using a table.
You should either pre-classify your data outside mapserver, and display the
classified result, or use the PROCESSING controls for scaling to do the
scaling to 8bit in a way that allows you to classify the scaled result in
a sensible way.
For instance, if you knew that all your input values were in the range 0-1024
you could scale that down, and then just modify your classification ranges to
be 1/4'th of the "real" values.
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 MapServer-users
mailing list