[MapProxy] Space in Layername
olt at omniscale.de
Wed Dec 11 06:52:19 PST 2013
On 11.12.2013, at 14:32, Rahkonen Jukka wrote:
> I fear I was wrong with the acceptable layer names.
> Typename in WFS 1.0.0 and 1.1.0 is of type QName and does not allow spaces
> However, layer names in WMS are of type string and spaces are OK
> I have thought for years that OGC standards behave similarly with layer names and typenames but obviously they do not.
Yeah, unfortunately the OGC only mentions "machine readable" and a programmer automatically thinks of identifiers as in variable/function names (alphanumerical with underscore), but the spec does not restrict the name to any characters.
> Thus ArcGIS server has acceptable layer names and the trouble is only in how to make MapProxy to pass them correctly. I hope this Mapserver thread gives some ideas for you.
I do think that MapProxy handles this right. But I might be wrong.
WMS query parameters are sent in an HTTP GET request as application/x-www-form-urlencoded data and this defines that spaces should be encoded as "+". WMS 1.1.0 clearly stated that ```[...] the space character (" ") is an exception, and shall be encoded as a plus sign ("+"). A server shall be prepared to decode any character encoded in this manner.```
WMS 1.1.1 only refers to the RFC 2396, but this RFC does not define the encoding of the query part.
WMS 1.3.0 made it clear again that "The server shall be prepared to decode any character escaped in this manner, and to decode the “+” character as a space."
So ArcGIS should handle a request for `...&layers=Umringe+Kreis&...` as a request for the layer "Umringe Kreis".
Form the last mail:
> 2) mapfile encoding the layers list works fine
> the original wms server logs this (iis):
This looks like it's encoded twice. It's hard to believe that IIS/ArcGIS are really expecting that and I don't know where they could have interpreted that in the spec. Any ArcGIS experts around?
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
More information about the MapProxy