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

Frank Warmerdam warmerdam at pobox.com
Tue Jun 30 13:35:51 EDT 2009


Stefan Schantz wrote:
> Hello Frank,
> thank you for your explaination. I think, that now i have a small idea, 
> what the UMN Mapserver is doing with my raster image.
> As I wrote, I use gdal_grid to get my raw data.
> Is it right, that if I use the output format Geotiff with the option - 
> ot Byte, i would avoid these rounding errors? (Also long as my values 
> are <255. At least it seems so.)
> 
> In another case the values of the raw data have a range from 0 to 1E7 
> (and even higher). I have the problem, that the gradient is very high, 
> so that only 2 classes are shown in picture.
> Is there any way for a logarithmic pre processing like 0-3; 3-10; 10-30; 
> 30-100; 100-300; 300-1000; >1000
> I tried to set
> PROCESSING "SCALE=1,1001"
> PROCESSING "SCALE_BUCKETS=1000"
> in the hope, that the last buckets will get all values >1000, but this 
> was thought too simple.

Stefan,

Values outside the scale range are currently treated as not to be classified
and will not get drawn.  I can see this makes it hard to handle data with a
broad dynamic range effectively.

My suggestion is to reclassify the data before using it with MapServer.

Alternatively, it would be nice if MapServer had a mode where it directly
classified pixel values instead of doing it via a lookup table (as is
done now) though that could get quite slow.

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