From: David Blasby Date: Tue, 27 Apr 2004 23:47:39 +0000 (+0000) Subject: minor 3d geometrycollection bug fix X-Git-Tag: pgis_0_8_2~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9e9558ea66a4676f1bf236a9f6c7902082505ec;p=postgis minor 3d geometrycollection bug fix git-svn-id: http://svn.osgeo.org/postgis/trunk@520 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis_inout.c b/postgis_inout.c index 2b72eeebe..31ea3726d 100644 --- a/postgis_inout.c +++ b/postgis_inout.c @@ -11,6 +11,9 @@ * ********************************************************************** * $Log$ + * Revision 1.37 2004/04/27 23:47:39 dblasby + * minor 3d geometrycollection bug fix + * * Revision 1.36 2004/01/13 22:14:25 pramsey * Changed getint and getdouble used by WKB so that it plays nice with * memory alignment (solaris issue). @@ -2791,6 +2794,9 @@ char *to_wkb_collection(GEOMETRY *geom, bool flip_endian, int32 *end_size) result = palloc( total_size +9); // need geometrycollection header + if (geom->is3d) + coll_type += WKB3DOFFSET; + if (flip_endian) { flip_endian_int32((char *) &coll_type); @@ -2799,6 +2805,8 @@ char *to_wkb_collection(GEOMETRY *geom, bool flip_endian, int32 *end_size) //could use a memcpy, but... + + result[0] = byte_order; result[1] = c_type[0]; //type result[2] = c_type[1]; @@ -4821,3 +4829,5 @@ GEOMETRY *makeNullGeometry(int SRID) return result; } + +