[postgis-users] WKT format issues?
Richard Taylor
postgis at rest.clara.co.uk
Fri Sep 26 03:55:44 PDT 2003
I am writting a parser for the WKT format in python (I'll write one for WKB
format next).
I may be missing something but it appears that many of the WKT strings
produced at present do not agree with the spec. The issue is around
bracketing points e.g.:
Linestring comes out as:
SRID=128;LINESTRING(0 0,1 1,1 2)
But "should" be:
SRID=128;LINESTRING((0 0),(1 1),(1 2))
Multipoloygon as:
SRID=128;MULTIPOLYGON(((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2
0,1 1 0)),((-1 -1 0,-1 -2 0,-2 -2 0,-2 -1 0,-1 -1 0)))
should be:
SRID=128;MULTIPOLYGON((((0 0 0),(4 0 0),(4 4 0),(0 4 0),(0 0 0)),((1 1 0),(2 1
0),(2 2 0),(1 2 0),(1 1 0))),(((-1 -1 0),(-1 -2 0),(-2 -2 0),(-2 -1 0),(-1 -1
0))))
The issue is there for POLYGON, MULTIPOINT and MULTILINESTRING as well.
Am I misreading the spec or is there a problem with the format that PostGIS is
generating.
Forgive me if this has been discussed before, I am new to the list. I did a
search and found some discussion about MULTIPOINT but not about the other
types.
Regards
Richard
--
You can normally find me on Jabber as RichardTaylor at jabber.org.
More information about the postgis-users
mailing list