[mapserver-users] WMS Layer Ordering

Daniel Morissette morissette at dmsolutions.ca
Tue May 21 07:11:40 PDT 2002


Paul Ramsey wrote:
> 
> What is the algorithm which determines the relationship between layer
> ordering in the map file and the layer ordering in the WMS capabilities?
> They do not appear to match up 1:1. 


Hi Paul,

Unless you have uncovered a bug, which is always possible, then the
order of the layers in the capabilities should be:

1- First all layers that do NOT belong to any group are listed in the
order that they appear in the mapfile

2- Then the layers that belong to a group are listed by group.  The
order of the groups should be based on the order of first of occurence
of each group when scanning the layers in the mapfile.

If this is not the behavior that you witnessed then please file a bug
about this with a sample mapfile and I'll have a look.


> This is not an unimportant problem,
> since the layer order passed in the GetMap request seems to be respected
> by the renderer (so if I say LAYERS=roads,lakes my water features will
> be rendered on top of my roads features). So if I read my layers out of
> GetCapabilities, and then apply those layers in a GetMap in exactly the
> same order I get them, the result may be quite different from the result
> if I did the same query using the mapserver interface instead of the WMS
> interface.
> 

I agree that if you have some layers with a group value and some without
group values then following the order of layers in the capabilities
could lead to cartographically invalid results.

Suggestions of better ways to handle this are welcome.

Thanks,

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the MapServer-users mailing list