[postgis-users] Wrong format: PostGIS misses a " " in it's WKT output?

Paul Ramsey pramsey at cleverelephant.ca
Fri Apr 23 13:24:18 PDT 2021


Since hopefully most parsers will consume either version (and kind of have to) just go with emitting whatever makes you feel good, no?

> On Apr 23, 2021, at 1:21 PM, Rémi c <remi.cura at gmail.com> wrote:
> 
> Hey Paul, great to hear from you!
> Yeah I agree this is a bit confusing :-/
> 
> The standards are here, page 54.
> The interesting line is ```<polygon tagged text> ::= polygon <polygon text>```
> Where `<polygon text>` is then refined into EMPTY or a list of linestrings between parenthesis.
> 
> It looks like the python lib Shapely enforces the space.
> Not sure what to do here, I'd like to follow the standard, 
> but the PostGIS is kind of the standard way to follow the standard.
> 
> Remi
> 
> 
> 
> Le ven. 23 avr. 2021 à 15:50, Paul Ramsey <pramsey at cleverelephant.ca> a écrit :
> Reference please? In general the OGC standards have a lot of room for interpretation in them.
> Certainly we've done it this way for 20 years, so :)
> P.
> 
> > On Apr 23, 2021, at 12:44 PM, Rémi c <remi.cura at gmail.com> wrote:
> > 
> > Hey dear list,
> > I'm looking at ST_asWKT() function.
> > I noticed an issue here:
> > PostGIS outputs something like:
> > `POLYGON((1 2, 2 3, 3 4, 1 2))`
> > Yet the WKT standard requires a space after `POLYGON`, like
> > `POLYGON ((1 2, 2 3, 3 4, 1 2))`
> > 
> > Am I missing something here?
> > Thanks folks.
> > Remi
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/postgis-users
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list