[postgis-devel] WKT Output Change

Sandro Santilli strk at kbt.io
Fri May 20 03:16:29 PDT 2022


On Mon, Apr 11, 2022 at 11:04:30PM +0200, Sandro Santilli wrote:
> On Mon, Apr 11, 2022 at 08:59:52AM -0700, Paul Ramsey wrote:
> > https://github.com/postgis/postgis/pull/682/
> > 
> > Just a point of discussion, this PR to change the default MULTIPOINT output. 
> > - Pro: it's correct, the ISO spec mandates extra parens, so MULTIPOINT((1 1), (2 2), (3 3))
> > - Also: It's not new, this was true of the ISO spec from the start, I just mis-read it
> > - Con: It's a change, to a core output format, after a good decade
> > 
> > Some side notes
> > - The input parser already accepts the correct ISO form, so this won't break *our* consumption or ability to round-trip WKT
> > 
> > I'm inclined to accept, and make sure we have good change / news notes about it, as it's potentially breaking.
> 
> I'd accept too, and it's to be noted as "Breaking Change" in the NEWS.

As a user who was hit by this change (testcases started failing against the master
branch of PostGIS) I'm wondering if OGC specs also mandated the extra parens, and
if the ISO specs have versions we might want at some point to support.

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)

--strk;


More information about the postgis-devel mailing list