NetCDF via OpenDAP/DODS into mapserv

Frank Warmerdam fwarmerdam at GMAIL.COM
Sat Jan 8 13:06:52 EST 2005


On Thu, 30 Dec 2004 15:42:51 -0600, Frank Ehlers <LuckyEddie at gmx.net> wrote:
...
> All I see in the web browser (after putting the correct latlong values into
> the map file to view the area the latlong values specify in the NetCDF
> file) is then a rectangular area filled with red points. That makes me
> believe that in principle the connection, the .nc NetCDF file and the map
> file are ok.

Eddie,

Cool, I think you are past the hard part at least.

> My QUESTION:
> How can I plot an image (color coded depth values) with this method?
>
> It would be great if anyone could help me here(e.g. some example code)!

You will need to make a CLASS declaration for each
color you want in your color ramp, classified on the basis
of your depth variable.  Lots of CLASSes like this:

CLASS
   NAME "10 - 20"
   EXPRESSION "([DEPTH] > 10 and [DEPTH] < 20)"
   COLOR 0 0 255
END

Unfortunately, there isn't really any mechanism in
MapServer to color features based on a colorbar using
some attribute scaled to the color bar.  Hopefully that can
be added at some point.

PS. Don't exactly trust what I have typed.  I haven't tried
this too recently.  But it should give you an idea and you can
dig around in the mapfile reference and other examples for
additional details.

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