]> granicus.if.org Git - postgis/commitdiff
Fix for Issue 108 and regress test.
authorMark Leslie <mark.leslie@lisasoft.com>
Mon, 2 Feb 2009 06:19:29 +0000 (06:19 +0000)
committerMark Leslie <mark.leslie@lisasoft.com>
Mon, 2 Feb 2009 06:19:29 +0000 (06:19 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/1.3@3606 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_sqlmm.c
regress/sql-mm-general.sql
regress/sql-mm-general_expected

index ccdda9d1dff7ee3be4fd262a6508b1b84d011106..b7969b9b3fda06576eb2f6468b15d21db9c4e91e 100644 (file)
@@ -625,13 +625,13 @@ append_segment(LWGEOM *geom, POINTARRAY *pts, int type, int SRID)
                 newPoints = ptarray_construct(TYPE_HASZ(pts->dims), TYPE_HASM(pts->dims), pts->npoints + line->points->npoints - 1);\r
                 for(i=0; i<line->points->npoints; i++)\r
                 {\r
-                        getPoint4d_p(pts, i, &pt);\r
+                        getPoint4d_p(line->points, i, &pt);\r
                         setPoint4d(newPoints, i, &pt);\r
                 }\r
                 for(i=1; i<pts->npoints; i++)\r
                 {\r
-                        getPoint4d_p(line->points, i, &pt);\r
-                        setPoint4d(newPoints, i + pts->npoints, &pt);\r
+                        getPoint4d_p(pts, i, &pt);\r
+                        setPoint4d(newPoints, i + line->points->npoints - 1, &pt);\r
                 }\r
                 result = (LWGEOM *)lwline_construct(SRID, NULL, newPoints);\r
                 lwgeom_release(geom);\r
index d1de42bc8098493e1c4a18d2a6543c54d1842670..898ef1eeb80b87b43c4804bd8ee08f63cc2f7dca 100644 (file)
@@ -75,4 +75,12 @@ SELECT ST_HasArc(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(
                 8 12 7 8,\r
                 7 10 7 8,\r
                 9 9 7 8)))'));\r
-\r
+SELECT ST_AsEWKT(ST_LineToCurve('LINESTRING(\r
+               -13151357.927248 3913656.64539871,\r
+               -13151419.0845266 3913664.12016378,\r
+               -13151441.323537 3913666.61175286,\r
+               -13151456.8908442 3913666.61175286,\r
+               -13151476.9059536 3913666.61175286,\r
+               -13151496.921063 3913666.61175287,\r
+               -13151521.3839744 3913666.61175287,\r
+               -13151591.4368571 3913665.36595828)'));\r
index 8fa666bc3cd38122cc8ad3177b5e8ad23753fde9..786d4f96b6699a3f12a01df60277ba19ff2deb7c 100644 (file)
@@ -11,3 +11,4 @@ t
 f
 f
 t
+LINESTRING(-13151357.927248 3913656.64539871,-13151419.0845266 3913664.12016378,-13151441.323537 3913666.61175286,-13151456.8908442 3913666.61175286,-13151476.9059536 3913666.61175286,-13151496.921063 3913666.61175287,-13151521.3839744 3913666.61175287,-13151591.4368571 3913665.36595828)