[postgis-devel] ST_AsText(geometry) 2.0

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Dec 7 00:48:18 PST 2010


Paul Ramsey wrote:

> I have in the past talked about changing the output of ST_AsText() to
> emit the ISO SQL/MM well-known-text instead of the OGC.
> 
> For 2d features, there is no difference.
> 
> For higher dimensional features, the current behavior is to strip them
> off and return 2d WKT. The ISO behavior is to return them, with
> dimensional information. So an XYZ point would come out as 'POINT Z (0
> 0 0)' in ISO and as 'POINT(0 0)' in the current behavior. An XYM point
> would be 'POINT M (0 0 0)'.
> 
> The ISO variants are certainly preferable in not dropping information
> on the floor and in accurately conveying the dimensionality of the
> features. The downside is the backwards breaking nature of the change.
> Any applications that expect 2d WKT from AsText in all cases will be
> surprised to occasionally receive 3d and 4d WKT.

I don't have a problem with switching to ISO output format if we're all 
agreed that we want to go SQL/MM rather than ISO 19125, since if we're 
going to do it, 2.0 is the time to make the change.

If we do decide to do this, I think that we should make an effort to get 
in contact with other related projects to make them aware of the change 
and to shout loudly about it in the release notes to reduce any issues 
that may occur. Anyone who jumps from a 1.x series release to a 2.x 
series release without significant testing really is not thinking straight.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-devel mailing list