RE: Best Practice for encoding spatial coverage

Andrea,

Sorry, but I can't resist a comment on WKT:

> - it is case and "space" insensitive - i.e., all the following
> variants are valid: " point(0 0)" "PoinT ( 0  0)", " POINT(0  0 )  "

The specification of WKT in SFA [1] says _in the text_ that " Well known text is case insensitive." (ยง 7.2.1). The BNF does not reflect this though. E. g. for "point" it states 

<point tagged text> ::= point <point text> 

Further, the specification say nothing at all about whitespace when defining a point:

<point text> ::= <empty set> | <left paren> <point> <right paren> 
<point> ::= <x> <y>
<x> ::= <signed numeric literal>
<y> ::= <signed numeric literal>
<signed numeric literal> ::= {<sign>}<unsigned numeric literal>
<unsigned numeric literal> ::= <exact numeric literal>
    |<approximate numeric literal>
<exact numeric literal> ::= <unsigned integer>
    {<decimal point>{<unsigned integer>}}
    |<decimal point><unsigned integer>
<approximate numeric literal> ::= <mantissa>E<exponent>
<mantissa> ::= <exact numeric literal>
<exponent> ::= <signed integer>
<signed integer> ::= {<sign>}<unsigned integer>
<unsigned integer> ::= (<digit>)*

I stumbled over this when I tried to use the BNF to create a validator for WKT...

[1] http://portal.opengeospatial.org/files/?artifact_id=25355


Best,

Lars

Received on Friday, 19 June 2015 15:45:36 UTC