[postgis-devel] WKT Output Change

Paul Ramsey pramsey at cleverelephant.ca
Fri May 20 07:53:26 PDT 2022



> On May 20, 2022, at 3:16 AM, Sandro Santilli <strk at kbt.io> wrote:
> 
> 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.

SFSQL 1.1, from way back in 1999 actually does mandate the extra parens (it's subtle, so it's easy to see how the mistake could be made). It's possble that the original mis-reading was actually Dave's and I just aped it when I re-wrote the emitter for 2.0. Regardless, we have been wrong relative to the official specs for a Very Long Time.

P.


> 
> 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;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20220520/5f522bdb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot_892.png
Type: image/png
Size: 35063 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20220520/5f522bdb/attachment-0001.png>


More information about the postgis-devel mailing list