Bug #13702 Incorrect MySQL Spatial Extension Geometry Examples
Submitted: 3 Oct 2005 9:30 Modified: 21 Nov 2005 19:41
Reporter: Charles Teel Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version: OS:
Assigned to: Paul DuBois CPU Architecture:Any

[3 Oct 2005 9:30] Charles Teel
Description:
Many of these examples have spaces where they should not be.  For example...
MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,7 5,7 7,5 7, 5 5)))

There is a space on the last 5 5 of the last polygon.  If you are doing WKT regex be careful =)

MySql GeomFromText() appears to handle this however.

How to repeat:
http://dev.mysql.com/doc/mysql/en/gis-wkt-format.html
[3 Oct 2005 9:55] Valeriy Kravchuk
Than you for a problem report. It looks like a documentation request, at most.

What is the problem for you? Space after the ',' and before 5 5 pair? It is common to programming languages to add any number of spaces among syntax expressions. Isn't is usual to see the statements like:

select a,   b,c, d from some_table

The only formal rules I found was a BNF grammar:

<MultiPolygon Text> := EMPTY
| ( < Polygon Text > {, < Polygon Text > }* )

<Polygon Text> := EMPTY
| ( <LineString Text > {, < LineString Text > }*)

<LineString Text> := EMPTY
| ( <Point > {, <Point > }* )

<Multipoint Text> := EMPTY
| ( <Point Text > {, <Point Text > }* )

<Point Text> := EMPTY | ( <Point> )
<Point> := <x> <y>
...

So, I see nothing that prohibits to insert space after , in any of these clauses.

Your comments are welcome.
[3 Oct 2005 14:40] Charles Teel
Very true.  I just had a problem with a regex I was building and only mentioned it because it seemed inconsistant.  Not a problem.