-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Detailed description
MultiPoint ((10 10), (20 20))
CrEOF \ Geo \ WKT \ Exception \ UnexpectedValueException
[Syntax Error] line 0, col 12: Error: Expected CrEOF\Geo\WKT\Lexer::T_INTEGER, got "(" in value "MultiPoint ((10 10), (20 20))"
MultiPoint (10 10, 20 20) (no parenthesis around individual points)
Ok
Context
The WKT specification states that the first WKT string is valid, while the second isn't: http://www.opengeospatial.org/standards/sfa (version 1.2.1, section 7.2.2, page 55), but this package has a test that explicitly defines that the first WKT string is invalid: https://github.com/creof/wkt-parser/blob/master/tests/CrEOF/Geo/WKT/Tests/ParserTest.php#L461.
Possible implementation
The multiPoint method should be modified to comply with the spec, but this can be experienced as a breaking change. The parenthesis can also be made optional to make sure spec-compliant MultiPoints can be parsed, but also allow the variant without extra parenthesis.
If we agree on a solution, I can make you a PR.