]> granicus.if.org Git - postgis/commitdiff
After a quick sanity grep, I noticed that ST_Transform() was also susceptible to...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Fri, 7 Nov 2008 13:54:21 +0000 (13:54 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Fri, 7 Nov 2008 13:54:21 +0000 (13:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/1.3@3274 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_transform.c

index 7c966b8a10c9ab9160a709e82893b79dbb283383..e2b2370ae01a8a66c43362eebcc7144aec43b82a 100644 (file)
@@ -750,6 +750,7 @@ lwgeom_transform_recursive(uchar *geom, PJ *inpj, PJ *outpj)
                LWLINE *line=NULL;
                LWPOINT *point=NULL;
                LWPOLY *poly=NULL;
+               LWCURVE *curve=NULL;
                POINT4D p;
                uchar *subgeom=NULL;
 
@@ -795,6 +796,20 @@ lwgeom_transform_recursive(uchar *geom, PJ *inpj, PJ *outpj)
                        continue;
                }
 
+               curve = lwgeom_getcurve_inspected(inspected, j);
+               if (curve != NULL)
+               {
+                       POINTARRAY *pts = curve->points;
+                       for (i=0; i<pts->npoints; i++)
+                       {
+                               getPoint4d_p(pts, i, &p);
+                               transform_point(&p, inpj, outpj);
+                               setPoint4d(pts, i, &p);
+                       }
+                       lwgeom_release((LWGEOM *)curve);
+                       continue;
+               }
+
                subgeom = lwgeom_getsubgeometry_inspected(inspected, j);
                if ( subgeom != NULL )
                {