As part of the new features of the next release of MapServer (6.4), two of them are particularly interesting if you used to work with contours data:
Here is a small example that uses both features as demonstration purpose. I assume you already know how to create a mapfile with MapServer.
Create a Vector Contour Layer
With a contour dataset (raster), you can define a MapServer contour layer as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
you will get a contour layer rendered directly in MapServer:
You will notice that the lines are non-smooth curves and it will be worst if you zoom in. Using shape smoothing is very useful for thoses cases.
You can enable the smoothing with the GEOMTRANSFORM directive in the layer (or style) definition:
1 2 3
The rendering is lot nicer with smoothing. These new features are available in the development version of MapServer. You can refer to their RFCs for more information.