]> granicus.if.org Git - postgis/commitdiff
Alas a functioning polyhedralsurface export viewable in freeWRL. Also add proto...
authorRegina Obe <lr@pcorp.us>
Wed, 16 Mar 2011 04:48:44 +0000 (04:48 +0000)
committerRegina Obe <lr@pcorp.us>
Wed, 16 Mar 2011 04:48:44 +0000 (04:48 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6903 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwout_x3d.c
postgis/postgis.sql.in.c

index 77aafd47797402fb96f146421d497afcae8a6e9a..f585936f7cb4e2ce552f3036923a15cb516a901a 100644 (file)
@@ -458,6 +458,9 @@ asx3d3_psurface_buf(const LWPSURFACE *psur, char *srs, char *output, int precisi
        for (i=0; i<psur->ngeoms; i++)\r
        {\r
                ptr += asx3d3_poly_buf(psur->geoms[i], 0, ptr, precision, opts, 1, defid);\r
+               if (i < (psur->ngeoms - 1) ){\r
+               ptr += sprintf(ptr, " "); //only add a trailing space if its not the last polygon in the set\r
+           }\r
        }\r
 \r
        /* Close outmost tag */\r
index a21bb3aa0859b55a40788fc741128ee46221fd65..099162115d1880905319046b70eb42769ba80409 100644 (file)
@@ -5075,6 +5075,12 @@ CREATE OR REPLACE FUNCTION ST_AsX3D(geom geometry, prec int4)
        RETURNS TEXT\r
        AS $$SELECT _ST_AsX3D(3,$1,$2,1,'');$$\r
        LANGUAGE 'sql' IMMUTABLE;\r
+       \r
+-- ST_AsX3D(geom, precision)\r
+CREATE OR REPLACE FUNCTION ST_AsX3D(geom geometry)\r
+       RETURNS TEXT\r
+       AS $$SELECT _ST_AsX3D(3,$1,15,1,'');$$\r
+       LANGUAGE 'sql' IMMUTABLE;\r
 COMMIT;\r
 \r
 #include "postgis_drop.sql.in.c"\r