[postgis-devel] WKT Output Change

Sandro Santilli strk at kbt.io
Mon May 23 01:49:42 PDT 2022


On Fri, May 20, 2022 at 10:20:20AM -0700, Martin Davis wrote:
> On Fri, May 20, 2022 at 3:19 AM Sandro Santilli <strk at kbt.io> wrote:
> 
> >
> > For now it looks like ST_AsEWKT is stable enough to be usable in testcases
> > but
> > we don't seem to have any formal documentation about the output to expect
> > from it.
> > Also, interesting enough, I found an example in the manual which reports
> > the output from ST_AsEWKT containing the extra parens while indeed it does
> > not ?
> > (line 192 of reference_accessor.xml)
> 
> 
> I think the manual should have a BNF for both WKT and EWKT.
> And EWKT should be aligned with WKT (so, extra parens in MultiPoints).

We have bnf for WKT under doc/bnf-wkt.txt, written by Paul in 2012,
and - incidentally - it DOES seem to require the inner parens already.

We don't have it for EWKT, as far as I can tell. The closest I can get
to an EWKT documentation is doc/ZMSgeoms.txt from 2005 (by myself) but
it only remarks differences from WKT and contains no example of MULTIPOINT.

> Lots of the manual examples show inner parens for MultiPoints.  Not sure
> how that came about.

We have a lot of both:

  git grep 'MULTIPOINT *( *[0-9]' doc | wc -l # 347
  git grep 'MULTIPOINT *( *('     doc | wc -l # 364

--strk;

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-devel mailing list