[postgis-devel] ISO WKT/WKB
Paul Ramsey
pramsey at opengeo.org
Mon Jun 20 10:19:40 PDT 2011
http://trac.osgeo.org/postgis/ticket/287
http://trac.osgeo.org/postgis/ticket/288
I'm ready to implement these. However, note that it's a scary time,
more particularly I think for WKB than WKT. It's possible to build a
WKB handler that can ingest both ISO-WKB and EWKB (in fact, we have
one) but not every client software will have one of these already in
place. Problems only occur with higher-dimensional geometries.
ST_AsText(geography) and ST_AsBinary(geography) already return ISO.
{{{
postgis20=# select st_astext('POINT Z (0 0 0)'::geometry);
st_astext
------------
POINT(0 0)
(1 row)
postgis20=# select st_astext('POINT Z (0 0 0)'::geography);
st_astext
-----------------
POINT Z (0 0 0)
(1 row)
}}}
Anyhow, implementing them would bring us to a "new consistency" but
would require any client that expects ST_AsBinary() and ST_AsText() to
consistently return 2d to be upgraded. Folks already consuming 3d/4d
will necessarily be using ST_AsEWKB and ST_AsEWKT so changing
ST_AsText() and ST_AsBinary() won't effect them, nor will the
differences in representation between ISO and EWKB/T.
P.
More information about the postgis-devel
mailing list