[postgis-devel] WKT form(s) of MULTIPOINT

Even Rouault even.rouault at mines-paris.org
Wed Dec 4 08:02:34 PST 2013


Le mercredi 04 décembre 2013 16:54:58, Mateusz Loskot a écrit :
> Thanks for digging this out Paul.
> 
> "Everyone follows the example!" is actually the answer
> I was looking for on ":)

For the record OGR can import WKT in both forms ( actually support for the the 
"bracketted form", i.e., MULTIPOINT((0 0),(1 2)) was added in GDAL 1.1.8), but 
exports the "MULTIPOINT(0 0,1 2)" form

> 
> M
> 
> On 4 December 2013 15:52, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
> > Not the first to notice this, though apparently it's rare enough to
> > only be found spottily.
> > 
> > http://lists.osgeo.org/pipermail/postgis-devel/2011-February/011759.html
> > 
> > The fact that the postgis form is in other places (openlayers) makes
> > things harder yet.
> > 
> > And the root cause raises his voice here,
> > http://lists.osgeo.org/pipermail/postgis-users/2003-September/003168.html
> > 
> > P
> > 
> > On Wed, Dec 4, 2013 at 7:44 AM, Paul Ramsey <pramsey at cleverelephant.ca> 
wrote:
> >> Well, that's embarrassing. We don't implement either spec, we follow
> >> SQL/MM, but it has the same BNF as the above. We got the initial
> >> sparser representation at the dawn of time, and I guess never changed
> >> it. I would have thought it would happen at 2.0 when the wkt emitter
> >> was re-written, but apparently I missed it (unless the archives show I
> >> did it on purpose)
> >> 
> >> P.
> >> 
> >> On Wed, Dec 4, 2013 at 7:31 AM, Mateusz Loskot <mateusz at loskot.net> 
wrote:
> >>> Hi,
> >>> 
> >>> Yet another curiosity from the OGC vs PostGIS ring.
> >>> Given the WKT BNF grammars specified in the two versions of OGC SFS:
> >>> 
> >>> 1) OGC 05-126 Version: 1.1.0
> >>> 
> >>> <MultiPoint Tagged Text> := MULTIPOINT <Multipoint Text>
> >>> <Multipoint Text> := EMPTY | ( <Point Text > {, <Point Text > }* )
> >>> <Point Text> := EMPTY | ( <Point> )
> >>> <Point> := <x> <y>
> >>> 
> >>> 2) OGC 06-103 Version: 1.2.[0-1]
> >>> 
> >>> <multipoint tagged text> ::= multipoint <multipoint text>
> >>> <multipoint text> ::= <empty set>
> >>> 
> >>>         | <left paren> <point text> {<comma> <point text>}* <right
> >>>         | paren>
> >>> 
> >>> <point text> ::= <empty set> | <left paren> <point> <right paren>
> >>> <point> ::= <x> <y>
> >>> 
> >>> Why PostGIS documentation shows MULTIPOINT(0 0,1 2)
> >>> as example in "OpenGIS WKB and WKT"?
> >>> (PostGIS can parse the degenerate form as well.)
> >>> 
> >>> BTW, Wikipedia [1] also shows the same form (after PostGIS?):
> >>> http://en.wikipedia.org/wiki/Well-known_text
> >>> 
> >>> I sense, this is due to *incorrect* example presented in 6.2.3 section
> >>> of the OGC 05-126 Version: 1.1.0,
> >>> where ‘MULTIPOINT (10 10, 20 20)’ is presented.
> >>> 
> >>> Which version of OGC SF does PostGIS implement here?
> >>> 
> >>> Best regards,
> >>> --
> >>> Mateusz  Łoskot, http://mateusz.loskot.net
> >>> _______________________________________________
> >>> postgis-devel mailing list
> >>> postgis-devel at lists.osgeo.org
> >>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
> > 
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html



More information about the postgis-devel mailing list