Raster not displaying correctly

Frank Warmerdam warmerdam at POBOX.COM
Sat Jan 20 18:19:14 EST 2007


Ian wrote:
> Metadata:
>   STATISTICS_MINIMUM=0.0011299999896437
>   STATISTICS_MAXIMUM=5.0749998092651
>   STATISTICS_MEAN=0.090484300081334
>   STATISTICS_MEDIAN=0.060400001704693
>   STATISTICS_MODE=0.016850000247359
>   STATISTICS_STDDEV=0.263437971404
>   LAYER_TYPE=athematic
> 
> The following simple layer draws a black box (which I've read may be a 
> data source/extent issue):
> 
> LAYER
>   NAME shear
>   TYPE RASTER
>   DATA /strainMap/shear/shear2.img
>   STATUS DEFAULT
>   PROJECTION
>     "proj=latlong"
>     "ellps=WGS84"
>     "datum=WGS84"
>   END
> END ## Layer
> 
> What am I missing?
> Thank you!

Ian,

By default MapServer will just cast the pixel values to a byte value
between 0 and 255.  It looks like the largest value in your file is 5.07
which would convert to 5 which is still essentially black.

I think you need to apply scaling or classification.  I'd suggest reading
the raster access howto  for details, but briefly adding the following line
to your layer should allow you to visualize things.

   PROCESSING "SCALE=AUTO"

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    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list