[postgis-tickets] r14940 - #3573, operator <<->> incorrectly calculates m distance

Daniel Baston dbaston at gmail.com
Tue Jun 7 06:49:28 PDT 2016


Author: dbaston
Date: 2016-06-07 06:49:28 -0700 (Tue, 07 Jun 2016)
New Revision: 14940

Modified:
   branches/2.2/NEWS
   branches/2.2/postgis/gserialized_gist_nd.c
   branches/2.2/regress/tickets.sql
   branches/2.2/regress/tickets_expected
Log:
#3573, operator <<->> incorrectly calculates m distance

Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS	2016-06-07 13:39:18 UTC (rev 14939)
+++ branches/2.2/NEWS	2016-06-07 13:49:28 UTC (rev 14940)
@@ -9,6 +9,7 @@
   - #3565, ST_SetPoint can crash backend
   - #3571, Install desktop file and application icons 
            for shp2pgsql-gui (Sebastiaan Couwenberg)
+  - #3573, Operator <<->> incorrectly calculates m distance
 
 
 PostGIS 2.2.2

Modified: branches/2.2/postgis/gserialized_gist_nd.c
===================================================================
--- branches/2.2/postgis/gserialized_gist_nd.c	2016-06-07 13:39:18 UTC (rev 14939)
+++ branches/2.2/postgis/gserialized_gist_nd.c	2016-06-07 13:49:28 UTC (rev 14940)
@@ -746,7 +746,7 @@
 		else if ( lwgeom_get_type(lw2) == LINETYPE )
 		{
 			LWPOINT *lwp2 = lwline_get_lwpoint(lwgeom_as_lwline(closest), 1);
-			m1 = lwgeom_interpolate_point(lw2, lwp2);
+			m2 = lwgeom_interpolate_point(lw2, lwp2);
 			lwpoint_free(lwp2);
 		}
 		else 

Modified: branches/2.2/regress/tickets.sql
===================================================================
--- branches/2.2/regress/tickets.sql	2016-06-07 13:39:18 UTC (rev 14939)
+++ branches/2.2/regress/tickets.sql	2016-06-07 13:49:28 UTC (rev 14940)
@@ -950,5 +950,8 @@
 -- #3565
 SELECT '#3565',ST_SetPoint(st_geomfromtext('LINESTRING EMPTY'), 0, ST_MakePoint(1,1));
 
+-- #3573
+SELECT '#3573', 'POINT M (0 0 13)'::geometry <<->> 'LINESTRING M (0 0 5, 0 1 6)'::geometry;
+
 -- Clean up
 DELETE FROM spatial_ref_sys;

Modified: branches/2.2/regress/tickets_expected
===================================================================
--- branches/2.2/regress/tickets_expected	2016-06-07 13:39:18 UTC (rev 14939)
+++ branches/2.2/regress/tickets_expected	2016-06-07 13:49:28 UTC (rev 14940)
@@ -292,3 +292,4 @@
 #3470|t
 #3470b|50
 ERROR:  Cannot set point values on EMPTY geometry, use ST_AddPoint to add points
+#3573|8



More information about the postgis-tickets mailing list