[mapserver-users] Is there a problem with layers when serving WMS?

Jeff Dege jeff.dege at korterra.com
Thu Jun 24 18:58:50 EDT 2010


I'm putting together a map via Mapserver and WMS (MapServer version 5.6.1 on Ubuntu 10.04), serving a set of shapefiles.

The basic approach is to have a pair of layers for each class of highways - interstate, US highways, state highways, local roads, etc.  One layer in each pair draws the geometry, the other draws the labels.  In this way, the user can turn the labels on and off, as needed.

I'm having a problem with highway labels showing up nowhere near where the highways are.  At my outermost zoom, all I'm displaying is the major highway geometry and the interstate names.  That works OK.

When I zoom in a bit, to where I start displaying the US highway names, I see names all over the place, drawn where there are no geometries.  I zoom in a bit more, and they go away.  (I'm viewing this with Quantum GIS, loading the maps as WMS layers).

To help track down what is going on, I took one of the names, did an "ogrinfo -where" to identify that there was, in fact, a featured with that name in the US highways shapefile.  I then extracted just those features into a new shapefile, using ogr2ogr, and then loaded that as a vector layer in Quantum GIS.  The aim was to find out where the feature that matched that name actually was.

It was nowhere near the label.  I set the new vector layer to draw in red, and it was easy to see.  With a label from the WMS properly drawn alongside.  But 75+ miles away, 600+ pixels across the map, was another label for that feature, nowhere near the feature it was supposed to be describing.

I've never seen anything quite like this.  But then, I'm just figuring out how to use mapserver to serve WMS.

Are there any known "gotchas", when drawing label layers in WMS?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100624/c84e7e2d/attachment.html


More information about the mapserver-users mailing list