[Qgis-developer] [QGIS-Server] Add a Short Name to layers for OGC Web Services

René-Luc Dhont rldhont at gmail.com
Mon Sep 21 02:06:42 PDT 2015


Hi Devs,
Hi Marco,

With some QGIS-Server user feedbacks, we think that it will be usefull 
to add an OGC Web Service (WMS, WFS, WCS) Name to metadata layers.

We think that we need to add an input to specify a OGC Web Service Name 
because a lot of users use QgsMapLayer.name() as a title. 
QgsMapLayer.name() is used by user as a title because it's the label in 
the QGIS legend and in the composer legend.

An other point is that currently if the user activates 'Use layer id as 
name' in the Project Properties and does not set the title in the layer 
metadata, the QgsMapLayer.name() will be used as the OGC Web Service Title.

In the WMS implementation specification, The Name is a text string used 
for machine-to-machine communication while the Title is for the benefit 
of humans. For example, a dataset might have the descriptive Title 
“Maximum Atmospheric Temperature” and be requested using the abbreviated 
Name “ATMAX”.
In the WFS, the Name has to be a valid XML Tag name and Tag names cannot 
contain any of the characters |!"#$%&'()*+,/;<=>?@[\]^`{|}~|, nor a 
space character, and cannot start with |-|, |.|, or a numeric digit.
The QgsMapLayer.id() can be a valid OGC Web Service, but it is too long 
and it's not an abbbreviated Name.

I propose to add a Short Name in the layer metadata which will:
* be stored as a WMSName element
* accessible through QgsMapLayer.shortName()
* be used as OGC Web Service Name if it has been set and 'Use layer id 
as name' has not been checked

Remarks are wellcome.

René-Luc D'Hont
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150921/b9a638c0/attachment.html>


More information about the Qgis-developer mailing list