[postgis-tickets] r14939 - #3573, operator <<->> incorrectly calculates m distance
Daniel Baston
dbaston at gmail.com
Tue Jun 7 06:39:18 PDT 2016
Author: dbaston
Date: 2016-06-07 06:39:18 -0700 (Tue, 07 Jun 2016)
New Revision: 14939
Modified:
trunk/postgis/gserialized_gist_nd.c
trunk/regress/tickets.sql
trunk/regress/tickets_expected
Log:
#3573, operator <<->> incorrectly calculates m distance
Modified: trunk/postgis/gserialized_gist_nd.c
===================================================================
--- trunk/postgis/gserialized_gist_nd.c 2016-06-07 12:57:22 UTC (rev 14938)
+++ trunk/postgis/gserialized_gist_nd.c 2016-06-07 13:39:18 UTC (rev 14939)
@@ -761,7 +761,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: trunk/regress/tickets.sql
===================================================================
--- trunk/regress/tickets.sql 2016-06-07 12:57:22 UTC (rev 14938)
+++ trunk/regress/tickets.sql 2016-06-07 13:39:18 UTC (rev 14939)
@@ -966,5 +966,8 @@
SELECT '#3470', ST_Polygonize(ARRAY[NULL]::geometry[]) IS NULL;
SELECT '#3470b', ST_Area(ST_Polygonize(ARRAY[NULL, 'LINESTRING (0 0, 10 0, 10 10)', NULL, 'LINESTRING (0 0, 10 10)', NULL]::geometry[]));
+-- #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: trunk/regress/tickets_expected
===================================================================
--- trunk/regress/tickets_expected 2016-06-07 12:57:22 UTC (rev 14938)
+++ trunk/regress/tickets_expected 2016-06-07 13:39:18 UTC (rev 14939)
@@ -294,3 +294,4 @@
#3437e|5
#3470|t
#3470b|50
+#3573|8
More information about the postgis-tickets
mailing list