From 6e2e1792813397b7bc3cbfd017cf96363b070b3e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 11 Jun 2015 19:58:57 +0000 Subject: [PATCH] Optimize ptarray_locate_along_linear to really honour the "from" parameter git-svn-id: http://svn.osgeo.org/postgis/trunk@13661 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwlinearreferencing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblwgeom/lwlinearreferencing.c b/liblwgeom/lwlinearreferencing.c index ca4ce2f3d..d61423339 100644 --- a/liblwgeom/lwlinearreferencing.c +++ b/liblwgeom/lwlinearreferencing.c @@ -1042,7 +1042,7 @@ ptarray_locate_along_linear(const POINTARRAY *pa, double m, POINT4D *p, int from /* Walk through each segment in the point array */ getPoint4d_p(pa, i, &p1); - for ( i = 1; i < pa->npoints; i++ ) + for ( i = from+1; i < pa->npoints; i++ ) { getPoint4d_p(pa, i, &p2); -- 2.40.0