WKT Format Notations – Difference Between ‘POINT()’ and ‘Point ()’

geometrywell-known-text

After reviewing this thread Adding field with geometry in WKT format in QGIS I started to wonder about the difference between the WKT notations: 'POINT(276547.16725324 5477265.87268898)' and 'Point (276547.16725324 5477265.87268898)' of the same vector geometry object. Is there any difference between them two?

The same applies also to 'LINESTRING()' and 'LineString ()', 'POLYGON(())' and 'Polygon (())'.

I have seen some related threads:

Until now IMHO it seems to be more a software issue, rather than a dispute between Semantics and Syntax.

Best Answer

The structure of WKT was originally defined in the standard OpenGIS® Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture https://portal.ogc.org/files/?artifact_id=13227. The current version of the standard is https://portal.ogc.org/files/?artifact_id=25355 and that is used as reference below.

EDIT

Excerpt from 7.2.1 BNF Introduction (bolding added):

The text representation of the instantiable Geometry Types implemented shall conform to this grammar. Well known text is case insensitive. Where human readability is important (as in the examples in this standard), an “upper camel-case” where each embedded word is capitalized, should be used

One can also try to interpret the BNF definition. In WKT geometry names point, linestring etc. are "names". "Name" is made of "letters", "letters" are made of "simple Latin Letters", which are made from a set of small case and upper case letters.

<name> ::= <letters>
<letters> ::= (<letter>)*
<letter> ::= <simple Latin letter>|<digit>|<special>
<simple Latin letter> ::= <simple Latin upper case letter>
|<simple Latin lower case letter>

<simple Latin lower case
letter> ::=
a|b|c|d|e|f|g|h|i|j|k|l|m
|n|o|p|q|r|s|t|u|v|w|x|y|z

<simple Latin upper case
letter> ::=
A|B|C|D|E|F|G|H|I|J|K|L|M
|N|O|P|Q|R|S|T|U|V|W|X|Y|Z

Thus Point and POINT are both OK, and nothing wrong with poinT either.