[postgis-commits] svn - r3606 - in branches/1.3: lwgeom regress

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Sun Feb 1 22:19:29 PST 2009


Author: mleslie
Date: 2009-02-01 22:19:29 -0800 (Sun, 01 Feb 2009)
New Revision: 3606

Modified:
   branches/1.3/lwgeom/lwgeom_sqlmm.c
   branches/1.3/regress/sql-mm-general.sql
   branches/1.3/regress/sql-mm-general_expected
Log:
Fix for Issue 108 and regress test.

Modified: branches/1.3/lwgeom/lwgeom_sqlmm.c
===================================================================
--- branches/1.3/lwgeom/lwgeom_sqlmm.c	2009-02-02 06:01:27 UTC (rev 3605)
+++ branches/1.3/lwgeom/lwgeom_sqlmm.c	2009-02-02 06:19:29 UTC (rev 3606)
@@ -625,13 +625,13 @@
                 newPoints = ptarray_construct(TYPE_HASZ(pts->dims), TYPE_HASM(pts->dims), pts->npoints + line->points->npoints - 1);
                 for(i=0; i<line->points->npoints; i++)
                 {
-                        getPoint4d_p(pts, i, &pt);
+                        getPoint4d_p(line->points, i, &pt);
                         setPoint4d(newPoints, i, &pt);
                 }
                 for(i=1; i<pts->npoints; i++)
                 {
-                        getPoint4d_p(line->points, i, &pt);
-                        setPoint4d(newPoints, i + pts->npoints, &pt);
+                        getPoint4d_p(pts, i, &pt);
+                        setPoint4d(newPoints, i + line->points->npoints - 1, &pt);
                 }
                 result = (LWGEOM *)lwline_construct(SRID, NULL, newPoints);
                 lwgeom_release(geom);

Modified: branches/1.3/regress/sql-mm-general.sql
===================================================================
--- branches/1.3/regress/sql-mm-general.sql	2009-02-02 06:01:27 UTC (rev 3605)
+++ branches/1.3/regress/sql-mm-general.sql	2009-02-02 06:19:29 UTC (rev 3606)
@@ -75,4 +75,12 @@
                 8 12 7 8,
                 7 10 7 8,
                 9 9 7 8)))'));
-
+SELECT ST_AsEWKT(ST_LineToCurve('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)'));

Modified: branches/1.3/regress/sql-mm-general_expected
===================================================================
--- branches/1.3/regress/sql-mm-general_expected	2009-02-02 06:01:27 UTC (rev 3605)
+++ branches/1.3/regress/sql-mm-general_expected	2009-02-02 06:19:29 UTC (rev 3606)
@@ -11,3 +11,4 @@
 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)



More information about the postgis-commits mailing list