netCDF in a mapfile

Frank Warmerdam fwarmerdam at GMAIL.COM
Wed Jan 26 09:24:19 EST 2005


On Wed, 26 Jan 2005 11:10:32 -0000, Lowe, D (Dominic) <D.Lowe at rl.ac.uk> wrote:
> Hi,
>
> I'm also interested in displaying netCDF (atmospheric/oceanographic) data.
> So far I've got a GMT generated file 'displayed' but I can only see it as a
> black rectangle. This suggests the GMT driver is working ok. However, any
> type of color expression eg:
>   COLOR
>     # some attempt at color mapping here
>   END
>
> just results in a blank image.
>
> Has anyone got any idea as to what a correct COLOR mapping would look like
> for a GMT file?
>
> Sorry I haven't got the gdalinfo output available now, but I can send it
> tomorrow if it helps.

Dominic,

First, I would encourage you to read over the MapServer 4.4 Raster
HOWTO.  I believe it talks a bit about scaling and classification of
raster data.

But you also need to ensure that GDAL is "seeing" the proper values
in your netCDF file.  The first way to check is to run gdalinfo with the
-mm flag.  This should report the minimum and maximum of the data.

If those values look OK, you should try viewing the file with a GDAL
based viewer such as OpenEV.

Assuming the values are coming through properly, you may find you
need to control the scaling explicitly in your mapfile.  To do that you
would put something like the following with a minimum and maximum
appropriate to your data.

  PROCESSING "SCALING=0,1000"

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