negative values and colors in Ascii Grids

Frank Warmerdam warmerdam at POBOX.COM
Mon Jan 16 08:29:14 EST 2006


On 1/15/06, Carola Jesch <cjesch at cct.lsu.edu> wrote:
> Hi,
>
> I have an contineous ASCII GRID (floating values) that I would like to
> display in MapServer. This grid shows bathymetry (ocean) and elevation
> (land) data. There are a lot of negative values for the ocean, starting from
> -1500 to 0 and only a small range for the land (0 to 20). When I am trying
> to display the grid, the entire image is black. Does MapServer support
> negative values? How can I display the grid with colors?
> I have tried to convert the Ascii file to a binary grid, but I don't know
> how to create a colormap (*.clr). ArcGIS doesn't seem to support this or
> does anyone of you how to do that?

Carola,

By default Mapserver will read the grid values directly, and
clip any values outside the range 0 to 255 the bounds.  So
all your negative values are cliipped to zero, and the
top value is 20  (out of 255) which would appear nearly
black.

The first step I would suggest is enabling autoscaling
with the layer directive:

  PROCESSING "SCALE=AUTO"

Beyond that I would suggest you review the raster howto.

  http://mapserver.gis.umn.edu/docs/howto/raster_data

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