[Geoserver-users] Questions about layer naming

Is there any standard or best practice for the valid charset used for layer names? E.g. it seems like using URL-significant chars is not a good idea (comma, semicolon, amp, etc).

If a layer is renamed from the default name (ie. the store resource name), is there any way in the UI to know what the name of the underlying resource is?

On Thu, Apr 23, 2015 at 6:59 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Is there any standard or best practice for the valid charset used for
layer names? E.g. it seems like using URL-significant chars is not a good
idea (comma, semicolon, amp, etc).

If a layer is renamed from the default name (ie. the store resource name),
is there any way in the UI to know what the name of the underlying resource
is?

Check the geoserver-devel archives, we had multiple discussons on the
topic, what's valid for one standard is not valid for the other and so on.
GeoServer poses no limitation, you're free to hang yourself (but also to
respect naming standards that would be forbidden if we picked the
minimum common denominator).

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Thanks. I found this discussion: http://osgeo-org.1560.x6.nabble.com/Layer-and-store-names-td5167890.html

TL;DR - spaces should not be used, and preferably names should be valid XML tag names (defined here: http://www.w3.org/TR/xml/#NT-Name)

I thought I might add this to the user guide…

···

On Thu, Apr 23, 2015 at 10:13 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Apr 23, 2015 at 6:59 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Is there any standard or best practice for the valid charset used for layer names? E.g. it seems like using URL-significant chars is not a good idea (comma, semicolon, amp, etc).

If a layer is renamed from the default name (ie. the store resource name), is there any way in the UI to know what the name of the underlying resource is?

Check the geoserver-devel archives, we had multiple discussons on the topic, what’s valid for one standard is not valid for the other and so on.
GeoServer poses no limitation, you’re free to hang yourself (but also to respect naming standards that would be forbidden if we picked the
minimum common denominator).

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Thu, Apr 23, 2015 at 9:47 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Thanks. I found this discussion:
http://osgeo-org.1560.x6.nabble.com/Layer-and-store-names-td5167890.html

TL;DR - spaces should not be used, and preferably names should be valid
XML tag names (defined here: http://www.w3.org/TR/xml/#NT-Name)

I thought I might add this to the user guide...

Please do so, but make sure to note that certain protocols (wms for
example) have no restrictions whatsoever, and that what you're suggesting
is just a way to ensure the name works across all protocols (which might
not be a requirement, some people only use wms for example).

People having externally mandated naming conventions might get really mad,
or stop using GeoServer at all, if we start telling them to play within
the confines of XML naming conventions, so let's be clear that the naming
convention is just a suggestion.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Roger that. How about:

Names must be compatible with their use in OWS service requests and response documents. In particular, they must not contain spaces. For general use, it is best if they use only the following characters: upper and lowercase letters, numbers, dash, underscore and period.

(I realized that semicolons probably cause issues in some situations - for instance, when workspaces are used)

···

On Thu, Apr 23, 2015 at 11:14 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Apr 23, 2015 at 9:47 PM, Martin Davis <mtnclimb@anonymised.com…84…> wrote:

Thanks. I found this discussion: http://osgeo-org.1560.x6.nabble.com/Layer-and-store-names-td5167890.html

TL;DR - spaces should not be used, and preferably names should be valid XML tag names (defined here: http://www.w3.org/TR/xml/#NT-Name)

I thought I might add this to the user guide…

Please do so, but make sure to note that certain protocols (wms for example) have no restrictions whatsoever, and that what you’re suggesting
is just a way to ensure the name works across all protocols (which might not be a requirement, some people only use wms for example).

People having externally mandated naming conventions might get really mad, or stop using GeoServer at all, if we start telling them to play within
the confines of XML naming conventions, so let’s be clear that the naming convention is just a suggestion.

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Fri, Apr 24, 2015 at 4:49 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Roger that. How about:

Names must be compatible with their use in OWS service requests and
response documents. In particular, they must not contain spaces. For
general use, it is best if they use only the following characters: upper
and lowercase letters, numbers, dash, underscore and period.

As far as I know, spaces are also valid (in WMS), you just have to
url-encode them when making requests

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Hi,

Yes, spaces are allowed and they are very common in WMS services made with ESRI servers.

I think that Geoserver users have had trouble with periods but I am not sure. Absolutely comma in a layer name has caused troubles, think about GetMap: &layers=fine_idea,of_my_own.

WFS is so common service and folks are publishing layers with both WMS and WFS that it might be good to especially mention that name of a featuretype must not (according to standard) begin with a number or underscore.

Good test for ourselves would be to test sometimes what Geoserver accepts and what kind of escaping is needed

  • What we can cascade with WMS?

  • What we can cascade with WFS?

“Before you accuse me, have a look at yourself”.

-Jukka Rahkonen-

···

Andrea Aime wrote:

On Fri, Apr 24, 2015 at 4:49 PM, Martin Davis <mtnclimb@anonymised.com.> wrote:

Roger that. How about:

Names must be compatible with their use in OWS service requests and response documents. In particular, they must not contain spaces. For general use, it is best if they use only the following characters: upper and lowercase letters, numbers, dash, underscore and period.

As far as I know, spaces are also valid (in WMS), you just have to url-encode them when making requests

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Great, all good advice. I was curious about the provenance of the featuretype naming standard, so spelunked through the standards docs to get the final word… The WFS spec [1] says that a typename must be a XML Qname, and the XML spec [2] says that a QName Name part must start with a letter or underscore.

So now it could say:

Names must be compatible with their use in OWS service requests and response documents. Names must start with a letter or underscore. Spaces can be present, but will need to be escaped in URLs. For general use, consider using only the following characters: upper and lowercase letters, numbers, dash, underscore and period.

[1] https://portal.opengeospatial.org/files/?artifact_id=8339

[2] http://www.w3.org/TR/REC-xml/#NT-NameStartChar

(Wouldn’t it be great if the OGC specs were HTML…)

···

On Fri, Apr 24, 2015 at 10:36 AM, Rahkonen Jukka (MML) <jukka.rahkonen@anonymised.com847…> wrote:

Hi,

Yes, spaces are allowed and they are very common in WMS services made with ESRI servers.

I think that Geoserver users have had trouble with periods but I am not sure. Absolutely comma in a layer name has caused troubles, think about GetMap: &layers=fine_idea,of_my_own.

WFS is so common service and folks are publishing layers with both WMS and WFS that it might be good to especially mention that name of a featuretype must not (according to standard) begin with a number or underscore.

Good test for ourselves would be to test sometimes what Geoserver accepts and what kind of escaping is needed

  • What we can cascade with WMS?

  • What we can cascade with WFS?

“Before you accuse me, have a look at yourself”.

-Jukka Rahkonen-


Andrea Aime wrote:

On Fri, Apr 24, 2015 at 4:49 PM, Martin Davis <mtnclimb@anonymised.com.> wrote:

Roger that. How about:

Names must be compatible with their use in OWS service requests and response documents. In particular, they must not contain spaces. For general use, it is best if they use only the following characters: upper and lowercase letters, numbers, dash, underscore and period.

As far as I know, spaces are also valid (in WMS), you just have to url-encode them when making requests

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Fri, Apr 24, 2015 at 7:55 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Great, all good advice. I was curious about the provenance of the
featuretype naming standard, so spelunked through the standards docs to get
the final word... The WFS spec [1] says that a typename must be a XML
Qname, and the XML spec [2] says that a QName Name part must start with a
letter or underscore.

So now it could say:

Names must be compatible with their use in OWS service requests and
response documents. Names must start with a letter or underscore. Spaces
can be present, but will need to be escaped in URLs. For general use,
consider using only the following characters: upper and lowercase letters,
numbers, dash, underscore and period.

Without qualifying that the above sentence is valid for WFS only, that
sentence cannot be accepted in the user guide.
A better approach is to list the limits imposed by all standards and
version (WCS versions different greatly between one and the next for
example), and then you can provide a guidance for naming that would be
valid for all standards.

I hate repeating myself, but just a few mails ago I wrote:
"People having externally mandated naming conventions might get really mad,
or stop using GeoServer at all, if we start telling them to play within
the confines of XML naming conventions, so let's be clear that the naming
convention is just a suggestion."

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Ok, how about:

Names must be compatible with their use in OWS service requests and response documents. For general use, consider using only the characters: upper and lowercase letters, numbers, dash, underscore and period. Spaces can be present, but will need to be escaped in URLs.

The wording “consider using” is meant to indicate this is only a suggestion to avoid possible pain, not a validation rule.

···

On Fri, Apr 24, 2015 at 12:32 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Fri, Apr 24, 2015 at 7:55 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Great, all good advice. I was curious about the provenance of the featuretype naming standard, so spelunked through the standards docs to get the final word… The WFS spec [1] says that a typename must be a XML Qname, and the XML spec [2] says that a QName Name part must start with a letter or underscore.

So now it could say:

Names must be compatible with their use in OWS service requests and response documents. Names must start with a letter or underscore. Spaces can be present, but will need to be escaped in URLs. For general use, consider using only the following characters: upper and lowercase letters, numbers, dash, underscore and period.

Without qualifying that the above sentence is valid for WFS only, that sentence cannot be accepted in the user guide.
A better approach is to list the limits imposed by all standards and version (WCS versions different greatly between one and the next for example), and then you can provide a guidance for naming that would be valid for all standards.

I hate repeating myself, but just a few mails ago I wrote:
“People having externally mandated naming conventions might get really mad, or stop using GeoServer at all, if we start telling them to play within
the confines of XML naming conventions, so let’s be clear that the naming convention is just a suggestion.”

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Fri, Apr 24, 2015 at 9:42 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Ok, how about:

Names must be compatible with their use in OWS service requests and
response documents. For general use, consider using only the characters:
upper and lowercase letters, numbers, dash, underscore and period. Spaces
can be present, but will need to be escaped in URLs.

The wording "consider using" is meant to indicate this is only a
suggestion to avoid possible pain, not a validation rule.

Let me try a (longer) variation, removing spaces from the general rule as
they are not valid for WFS/WCS 2.0

--------------------------------------------------------------------------------------------------------------------
Different OGC protocol have different requirements on layer names.
If you want a single rule that will make layer names across protocols, use
only upper and lowercase letters, numbers, dash, underscore and period, and
make sure the name starts with a letter.

If instead you're interested in using only a subset of the protocols, here
is a summary:
* WCS 1.0, 1.1 and WMS pose no limit whatsoever on the layer names, which
can contain pretty much any character
* WFS (all versions) and WCS 2.0 require the layer name you give to
GeoServer to be an NCName, that is, a non colonized name. A NCName cannot
contain several symbol characters like colon, @, $, %, &, /, +, comma,
semicolon, whitespace characters or different parenthesis. Furthermore an
NCName cannot begin with a number, dot or minus character although they can
appear later in an NCName.
--------------------------------------------------------------------------------------------------------------------

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Isn’t it NCName only for WCS 2.x and QName for WFS? Think about topp:states.

Jukka

···

On Fri, Apr 24, 2015 at 9:42 PM, Martin Davis <mtnclimb@…84…> wrote:

Ok, how about:

Names must be compatible with their use in OWS service requests and response documents. For general use, consider using only the characters: upper and lowercase letters, numbers, dash, underscore and period. Spaces can be present, but will need to be escaped in URLs.

The wording “consider using” is meant to indicate this is only a suggestion to avoid possible pain, not a validation rule.

Let me try a (longer) variation, removing spaces from the general rule as they are not valid for WFS/WCS 2.0


Different OGC protocol have different requirements on layer names.
If you want a single rule that will make layer names across protocols, use only upper and lowercase letters, numbers, dash, underscore and period, and make sure the name starts with a letter.

If instead you’re interested in using only a subset of the protocols, here is a summary:

  • WCS 1.0, 1.1 and WMS pose no limit whatsoever on the layer names, which can contain pretty much any character
  • WFS (all versions) and WCS 2.0 require the layer name you give to GeoServer to be an NCName, that is, a non colonized name. A NCName cannot contain several symbol characters like colon, @, $, %, &, /, +, comma, semicolon, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName.

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Sat, Apr 25, 2015 at 3:00 PM, Rahkonen Jukka (MML) <
jukka.rahkonen@anonymised.com> wrote:

Isn't it NCName only for WCS 2.x and QName for WFS? Think about
topp:states.

GeoServer builds a QName by prefixing it with the workspace name, thus, to
have a valid QName, you must give
GeoServer a NCName (you cannot have two semicolons in a QName, or can you?)
Thus my wording "the layer name you give to GeoServer to be an NCName"

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Ok. For minimizing troubles might be good to mention that ASCII characters are most safe

Jukka

···

On Sat, Apr 25, 2015 at 3:00 PM, Rahkonen Jukka (MML) <jukka.rahkonen@…6847…> wrote:

Isn’t it NCName only for WCS 2.x and QName for WFS? Think about topp:states.

GeoServer builds a QName by prefixing it with the workspace name, thus, to have a valid QName, you must give
GeoServer a NCName (you cannot have two semicolons in a QName, or can you?)
Thus my wording “the layer name you give to GeoServer to be an NCName”

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Great, that’s very complete.

This could be added as a note in the section

http://docs.geoserver.org/stable/en/user/webadmin/data/layers.html#basic-info

… as soon as this is merged:

https://github.com/geoserver/geoserver/pull/1025

···

On Sat, Apr 25, 2015 at 2:08 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Fri, Apr 24, 2015 at 9:42 PM, Martin Davis <mtnclimb@anonymised.com> wrote:

Ok, how about:

Names must be compatible with their use in OWS service requests and response documents. For general use, consider using only the characters: upper and lowercase letters, numbers, dash, underscore and period. Spaces can be present, but will need to be escaped in URLs.

The wording “consider using” is meant to indicate this is only a suggestion to avoid possible pain, not a validation rule.

Let me try a (longer) variation, removing spaces from the general rule as they are not valid for WFS/WCS 2.0


Different OGC protocol have different requirements on layer names.
If you want a single rule that will make layer names across protocols, use only upper and lowercase letters, numbers, dash, underscore and period, and make sure the name starts with a letter.

If instead you’re interested in using only a subset of the protocols, here is a summary:

  • WCS 1.0, 1.1 and WMS pose no limit whatsoever on the layer names, which can contain pretty much any character
  • WFS (all versions) and WCS 2.0 require the layer name you give to GeoServer to be an NCName, that is, a non colonized name. A NCName cannot contain several symbol characters like colon, @, $, %, &, /, +, comma, semicolon, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName.

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Sun, Apr 26, 2015 at 7:44 AM, Martin Davis <mtnclimb@anonymised.com> wrote:

Great, that's very complete.

This could be added as a note in the section

http://docs.geoserver.org/stable/en/user/webadmin/data/layers.html#basic-info

... as soon as this is merged:

https://github.com/geoserver/geoserver/pull/1025

Yeah, I was hoping Mike would have a look, since normally he's the one
making large
refactors to the docs

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------