From cd38e28587c2c80bba6738aa07d169e3bf6a040d Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Fri, 1 Aug 2014 10:58:12 +0000 Subject: [PATCH] #2838 grudgingly wrap shape tags around collected geometries. It's the only way I can think of to create a valid x3d sub. git-svn-id: http://svn.osgeo.org/postgis/trunk@12847 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwout_x3d.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/liblwgeom/lwout_x3d.c b/liblwgeom/lwout_x3d.c index ba46fbc7a..dacb42639 100644 --- a/liblwgeom/lwout_x3d.c +++ b/liblwgeom/lwout_x3d.c @@ -670,13 +670,13 @@ asx3d3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int op //size = sizeof("") + defidlen*2; size = defidlen*2; - if ( srs ) - size += strlen(srs) + sizeof(" srsName=.."); + /** if ( srs ) + size += strlen(srs) + sizeof(" srsName=.."); **/ for (i=0; ingeoms; i++) { subgeom = col->geoms[i]; - //size += ( sizeof("/") + defidlen ) * 2; + size += ( sizeof("") + defidlen ) * 2; /** for collections we need to wrap each in a shape tag to make valid **/ if ( subgeom->type == POINTTYPE ) { size += asx3d3_point_size((LWPOINT*)subgeom, 0, precision, opts, defid); @@ -731,7 +731,7 @@ asx3d3_collection_buf(const LWCOLLECTION *col, char *srs, char *output, int prec for (i=0; ingeoms; i++) { subgeom = col->geoms[i]; - //ptr += sprintf(ptr, "<%sgeometryMember>", defid); + ptr += sprintf(ptr, "", defid); if ( subgeom->type == POINTTYPE ) { ptr += asx3d3_point_buf((LWPOINT*)subgeom, 0, ptr, precision, opts, defid); @@ -764,7 +764,7 @@ asx3d3_collection_buf(const LWCOLLECTION *col, char *srs, char *output, int prec else lwerror("asx3d3_collection_buf: unknown geometry type"); - //ptr += sprintf(ptr, "", defid); + ptr += sprintf(ptr, "", defid); } /* Close outmost tag */ -- 2.50.1