[postgis-devel] WKT Output Change

Even Rouault even.rouault at spatialys.com
Mon Apr 11 09:39:43 PDT 2022


Le 11/04/2022 à 17:59, Paul Ramsey a écrit :
> 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
Other points of comparison (just from their docs):

MySQL use the extra parens syntax on export 
(https://dev.mysql.com/doc/refman/8.0/en/gis-format-conversion-functions.html#function_st-astext) 
and accept both on import 
(https://dev.mysql.com/doc/refman/8.0/en/gis-wkt-functions.html)

SQL Server also seems to use extra parens syntax: 
https://docs.microsoft.com/en-us/sql/relational-databases/spatial/multipoint?view=sql-server-ver15

SAP Hana too: 
https://help.sap.com/doc/9db42d044f8e415180d4a4475873b50a/2.0.00/en-us/sap_hana_spatial_reference_en.pdf

But the following use the non extra parens syntax:

DB2: 
https://www.ibm.com/docs/en/db2/9.7?topic=formats-well-known-text-wkt-representation

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

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the postgis-devel mailing list