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

Rémi c remi.cura at gmail.com
Fri Apr 23 13:21:57 PDT 2021


Hey Paul, great to hear from you!
Yeah I agree this is a bit confusing :-/

The standards are here <https://www.ogc.org/standards/sfa#downloads>, 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210423/0054d302/attachment.html>


More information about the postgis-users mailing list