[MAPSERVER-USERS] WMS: layer status turned to on

Philippe Kruschitz p_kruschitz at hotmail.com
Thu Dec 11 05:11:04 EST 2008


Hi list,

I have a question concerning the behaviour of Mapserver when acting as a WMS
server. We have a web mapping application rendering roads and landcover
information for all Europe. As the dataset is pretty huge, we have to use
multiple, scale-dependant mapfiles. This was necessary because most of the
data had to be generalized to improve performance at small scales. The
layers with the same name in different mapfiles therefore use different
geometries and some of the layers aren't used in all mapfiles. For example,
the biggest layer, containing the local roads, is only used in the two last
mapfiles, at a very large scale.

I was asked to make the data available as a (demo) web mapping service. To
do this, I added, in our application, a servlet that would pass the request
to MS, calling different mapfiles while the scale changes. In order to be
able to answer the GetCapabilities request, a dummy mapfile had to be
written, containing all the layers that were used across the other mapfiles.
This forced me to also add the 'missing' layers in each mapfile.

For example, the local roads layer had to be added to the smaller scale
mapfiles. The status of those additional layers was put to OFF, but the MS
apparently turns the status to ON when the whole mapfile is requested (WMS
request --> LAYERS=mapobject_name). As a workaround, to not have the other
layers displayed, I deleted the class objects in the additional layers, but
MS logically has to prepare the whole layer for display anyway, resulting in
horrendous drawing times at small scales. When the single layers are
selected in the request (LAYERS=country,highways,...), the map will draw
very fast.

So my question is, is there a way not having the layer status turned to ON
when the 'root' WMS layer is selected? Or maybe there is another way to tell
MS to not prepare those layers? As the mapfiles and data structure are very
complex, setting up dummy (empty) data for each layer would take quite a
long time.

I know the whole thing isn't very clean and thoroughly thought through, but
it had to be completed very fast and that was the best solution I came up
with. If some of you have ideas on how to improve it, I would be very glad
to listen to your suggestions.

Best regards,

Philippe Kruschitz

PS: We're using Mapserver 5.0.0




-- 
View this message in context: http://www.nabble.com/WMS%3A-layer-status-turned-to-on-tp20952698p20952698.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list