1

I cannot find anywhere in the OGC WMS specification that a layer name attribute shall be unique, which is strange to me.

For example if you have a look at the below WMS service
https://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?service=WMS&version=1.3.0&request=GetCapabilities
the layers' names are not unique and the service is still working fine in QGIS.

It's obviously good practice to use unique layer names when building a WMS service, however I don't understand why the specification is not more restrictive about that, and how QGIS identifies one layer from another with the same name?

3
  • <eastBoundLongitude>360</eastBoundLongitude> values are wrong in the GetCapabilities response (value can't be higher than +180)
    – nmtoken
    Apr 27 at 17:25
  • It would be just as interesting to know how the server could supply the correct layer, if there was any ambiguity in layer names.
    – nmtoken
    Apr 27 at 18:24
  • 1
    The duplicate layers seem to be at different levels. The first one is a group layer and the second one is a member of the group. If user selects the name of a group layer the server will convert it into a list of names of the member layers. It may be that such configuration is valid and maybe it is configured that way for forcing the use of the other layer in the group named "default".
    – user30184
    Apr 27 at 21:02

1 Answer 1

0

I cannot find anywhere in the OGC WMS specification that a layer name attribute shall be unique, which is strange to me.

Strange perhaps, but the specification does tell us that

A server shall include at least one element for each map layer offered. If desired, layers may be repeated in different categories (i.e. enclosed in more than one parent ) when relevant.

and as a layer is identified by its name, that means that duplicate layer names are allowed by the specification.

2
  • ok but when you request a layer (by its name) how does the server differenciate layers having the same name ? May 9 at 8:37
  • I read it as it doesn't need to differentiate because it's the same layer
    – nmtoken
    May 9 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.