[postgis-users] MULTIPOINT WKT - parentheses or no parentheses?

Paragon Corporation lr at pcorp.us
Mon Jan 10 01:41:30 PST 2011


FWIW:  SQL Server accepts both formats too:
 
SELECT Geometry::STGeomFromText('MULTIPOINT(1 2,3 4)',0)

 

But it outputs the separated:

SELECT Geometry::STGeomFromText('MULTIPOINT(1 2,3 4)',0).STAsText();

MULTIPOINT ((1 2), (3 4))

Leo
http://www.postgis.us

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
???S????S ????????S
Sent: Saturday, January 08, 2011 3:40 PM
To: mgleahy at alumni.uwaterloo.ca; PostGIS Users Discussion
Subject: Re: [postgis-users] MULTIPOINT WKT - parentheses or no parentheses?


Mike
As far as i know, postgis accepts both formats as inputs. Specifically, if
you want to represent a multipoint in syntax WKT, you will use comma to
delimitate the values (e.g. "MULTIPOINT ( -1 1, 0 2, 3 4)" ). However,
postgis use an alternate and acceptable WKT representation for multipoint
using parenthesis to seperate each point (e.g "MULTIPOINT ((-1 1), (0 2), (3
4))" ), but will output the non-parenthetical version in the ST_AsText,
ST_AsEWKT output.
Now, i don't know if any application support both formats...






More information about the postgis-users mailing list