Bug report #15086

Updated by René-Luc ReLuc over 2 years ago

There is inconsistency between WMS and WFS layer names when calling a layer with a space in the name. This makes it difficult programmatically to use a combination of WMS and WFS.



*Case:*

I have a qgis-project which contains a layer with a space in the name, e.g. 'Skov fra fot'. The qgis-project is published as a WMS and WFS with QGIS Server (ubuntu).



In the WMS GetCapabilities-call, the name contains the space:



!WMS_call.png!



However in the WFS GetCapabilities-call, the space is replaced with '_' in the name.



!WFS_call.png!



According to the WFS-specification, the name needs to be a QName which does not allow spaces (https://en.wikipedia.org/wiki/QName). However, it seems there is no name-restriction in the WMS-specification.



*Idea for solutions 1:*

To ease programming, it would be good if the WMS and WFS followed the same rule when a layer contained a space (and other special characters). Since the WFS specification does not allow spaces, the same rule could be applied to the WMS. However, this will impact existing services.



*Idea for solution 2:*

If Idea 1 is not durable, then it should be possible to use the setting 'Use layer ids as names'. This works on WMS but not on WFS - where the layername is not changed to layerid (see #15085)

!WFS_use_layernames_as_ids_001.png!

Back