[mapserver-users] display isolines with raster data

Frank Warmerdam warmerdam at pobox.com
Mon Feb 1 10:57:05 EST 2010


windfreak wrote:
> I am wondering if it's possible to present isolines from raster data. I have
> NETCDF/GRIB/HDF5 data and want to plot lines. Until now I haven't found any
> examples like that.
> 
> If it's not possible, I think the best workaround is to create an
> application that generates shapefiles from raster data. Then I can use these
> shapefiles to plot lines with mapserver. Do you have suggestions for better
> workarounds?

Windfreak,

MapServer does not support computing isolines on the fly, though you might
get a vaguely similar effect by defining a class for each iso level with
different colors.

You can use the GDAL/OGR gdal_contour utility to produce iso-contours from
a raster file. Be aware that it produces very fine isolines with one segment
for each pixel crossed so some simplification might be appropriate before
using the results for map rendering.

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