[mapserver-users] classification of a raster image is changing

Frank Warmerdam warmerdam at pobox.com
Fri Jun 26 09:39:40 EDT 2009


Stefan Schantz wrote:
> Hello list,
> I have the following problem with UMNMapserver 5.2:
> I have interpolated some data with gdal_grid. As the result I got a tiff 
> file with one band.
> In the next step i classified the raster image in UMN Mapserver like this:
> 
> (..)
> CLASS
>   NAME "<= 12 h"
>   EXPRESSION ([pixel]> 9 AND [pixel] <= 12)
>   STYLE
>      COLOR 65 182 196
>   END
> END
> (..)
> so far so good
> But if i view the image in a client like QGIS, the classification 
> (colors) is changing depending on the chosen section (see appendix).
> What is my mistake?

Stefan,

I don't see an appendix.

Often when the results change depending on the view area it is one of two
things:

1) A pseudo-coloured product is being produced, and the color table is being
populated differently depending on the features and/or imagery inview.

2) autoscaling is being applied to raster data and the scaling range changes
depending on what imagery is in view.

I don't have enough context of your situation to know which is more likely or
even if it might be something else.  Seeing more of the mapfile might help
and/or public access to the WMS instance with a could example urls
demonstrating the differences.

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