[postgis-devel] MULTIPOINT() WKT

Paragon Corporation lr at pcorp.us
Sun Feb 13 15:05:56 PST 2011


 Strk and Paul,

Yes PostGIS accepts both as input.  I think the issue with OpenLayers is
that it expects the 

MULTIPOINT((-122.360 47.656), (-122.343 47.656))

As output to read in.  Though I recall when working on this I never had
issues perhaps because we were using geoserver as an intermediary between
the two and perhaps it output the extra parens.  That was a while back
though.

I would think though that if people were going to use OL directly -- they
would use GeoJSON or KML output functions from PostGIS and then possibly
output back from OL edits as GML or WKT (both of which would work since
PostGIS would accept any variant) for PostGIS to consume back.

I'm also curious what this guy in the article  is using for SQL Server
viewing.  When I output from SQL Manager (SQL Server 2008)  -- it gives me
the Oracle flavor

SELECT Geometry::STGeomFromText('MULTIPOINT(-122.360 47.656, -122.343
47.656)',0).STAsText() 

returns

MULTIPOINT ((-122.36 47.656), (-122.343 47.656))


MySQL does return the same as PostGIS and also accepts both forms:

SELECT AsText( GeomFromText( 'MULTIPOINT(-122.360 47.656, -122.343 47.656)',
0 ) ) 


I haven't checked to see what SharpMap.NET gives so maybe he's being fooled
by the tool he is using.


Does Oracle accept both flavors?  


-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of strk
Sent: Sunday, February 13, 2011 1:13 PM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] MULTIPOINT() WKT

On Sat, Feb 12, 2011 at 09:37:34PM -0800, Paul Ramsey wrote:
> Unfortunately, this blog post is correct.
> 
> http://viswaug.wordpress.com/2011/02/13/well-known-text-wkt-representa
> tion-for-multipoint

I think postgis reads both flavors since some time now.
JTS recently switched to the correct representation, while while GEOS still
spits the old one (but accepts both).

Known consumers we should take in consideration ?
OpenLayers ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel





More information about the postgis-devel mailing list