[mapserver-users] Backgrounds and Graticules in Pseudo-cylindrical Projections

winwaed at gmail.com winwaed at gmail.com
Tue Jul 14 05:42:56 PDT 2009


I am using MapServer to create some web maps using equal area projections.  
Most of these are pseudo-cylindrical, and I am currently using Mollweide  
for the initial development.

This works fine and I even have it working with WMS to OpenLayers  
(OpenLayers and adding layers from different projections is a different  
kettle of fish, but I've asked that question elsewhere!).

With a projection like this, a zoomed out map has two areas: projected  
space, and non-projected space. Ie. the projected globe does not take up  
the entire map "canvas".
To me, this means we have two background colors: the background for the  
shapes in projected space, and the true background of non-projected space.  
I hope that makes sense?
I'll try with a real world example. I have a layer that shows land masses.  
This is green. The mapfile is set to have a blue background (for the  
oceans). These are being drawn correctly, but the blue is also used for  
areas outside the projected globe.

Is it possible to specify a different color (or "transparent") for the area  
outside the projected globe?
The best idea I have is that I create a new layer of three shapes that  
cover the entire globe completely. This would be drawn as blue as the  
lowest layer in the mapfile, and the mapfile's background would be set to  
white. Is there a more efficient way?

I would also like to add a geographic graticule (ie. meridians and  
parallels). I've tried the GRID definition in the mapserver map file, but  
this simply draws a cartesian grid in projected space. Can this be done in  
MapServer? I guess I could again solve this with a new layer of shapes.  
Otherwise it is OpenLayers (with a dev version of a graticule control, or  
more likely - write my own code)


Richard Marsden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090714/f31f24c5/attachment.htm>


More information about the MapServer-users mailing list