From 883b8860cb03f56bc90241d5648f6f09fa62baca Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 30 Jan 2012 21:52:47 +0000 Subject: [PATCH] ST_Segmentize returns invalid LINESTRING for zero-length input (#1304) git-svn-id: http://svn.osgeo.org/postgis/trunk@8971 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/ptarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c index 3eff56546..53fdab043 100644 --- a/liblwgeom/ptarray.c +++ b/liblwgeom/ptarray.c @@ -428,7 +428,7 @@ ptarray_segmentize2d(const POINTARRAY *ipa, double dist) } else /* copy second point */ { - ptarray_append_point(opa, &p2, LW_FALSE); + ptarray_append_point(opa, &p2, (ipa->npoints==2)?LW_TRUE:LW_FALSE); p1 = p2; ipoff++; } -- 2.50.1