[postgis-devel] ST_AsText(geometry) 2.0

strk strk at keybit.net
Mon Dec 6 14:27:53 PST 2010


On Mon, Dec 06, 2010 at 09:49:20AM -0800, 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.

In an ideal world you would emit OGC using OGC functions,
and emit ISO from ISO functions, then you'll emit postgis
formats by default :)

Does OGC specify existance of an 'ST_AsText' function ?
Or was it just 'AsText' ?
What about ISO ?
Are we still in time to make them behave differently ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list