]> granicus.if.org Git - postgis/commitdiff
Unlease higher dimensions in ST_AsBinary, using SQL/MM (#288)
authorSandro Santilli <strk@keybit.net>
Wed, 11 Jan 2012 11:17:03 +0000 (11:17 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 11 Jan 2012 11:17:03 +0000 (11:17 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8769 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
postgis/lwgeom_ogc.c

diff --git a/NEWS b/NEWS
index 9782e6b3a4dca71c1eeb8194f66f6350d877d8c7..c36d1b76dbecd2c75b4cd7f884a015aaa4b4f03c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,8 @@ PostGIS 2.0.0
   - #817 Renaming old 3D functions to the convention ST_3D (Nicklas Avén) 
   - #548 (sorta), ST_NumGeometries,ST_GeometryN now returns 1 (or the geometry) 
     instead of null for single geometries (Sandro Santilli, Maxime van Noppen)
+  - #287, #288 ST_AsText and ST_AsBinary don't force 2d anymore, using SQL/MM
+    notation for higher dimensions
 
   * New Features *
   
@@ -103,7 +105,6 @@ PostGIS 2.0.0
     (Regina Obe, Leo Hsu / Paragon Corporation / 
     funding provided by Hunter Systems Group)
   - Overall Documentation proofreading and corrections. (Kasif Rasul)
-  - ST_AsText support for higher dimensions (#287)
   
  * Bug Fixes *
   - #1335 ST_AddPoint returns incorrect result on Linux (Even Rouault)
index 2fee536169d5fcd3c00d6e0aaf164887e329f8bb..9fec072b8a418ff17b72a71d64091529a0545de8 100644 (file)
@@ -850,21 +850,12 @@ Datum LWGEOM_asBinary(PG_FUNCTION_ARGS)
        uint8_t *wkb;
        size_t wkb_size;
        bytea *result;
-       /* By default we are currently emitting OGC WKB (2D) only */
-       uint8_t variant = WKB_SFSQL;
+       uint8_t variant = WKB_ISO;
 
        /* Get a 2D version of the geometry */
        geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
        lwgeom = lwgeom_from_gserialized(geom);
 
-       /* Get a 2D version of the geometry if necessary */
-       if ( lwgeom_ndims(lwgeom) > 2 )
-       {
-               LWGEOM *lwgeom2d = lwgeom_force_2d(lwgeom);
-               lwgeom_free(lwgeom);
-               lwgeom = lwgeom2d;
-       }
-
        /* If user specified endianness, respect it */
        if ( (PG_NARGS()>1) && (!PG_ARGISNULL(1)) )
        {