changeset 1623:20c98c2964f7

More obvious calculation of part length in clipping polygon segments.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 18 Dec 2018 16:47:28 +0100
parents a3a3fc630620
children 943823d03d50
files pkg/imports/polygon.go
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/imports/polygon.go	Tue Dec 18 16:37:34 2018 +0100
+++ b/pkg/imports/polygon.go	Tue Dec 18 16:47:28 2018 +0100
@@ -57,7 +57,7 @@
 		if i+1 >= len(parts) {
 			howMany = int32(len(points)) - pos
 		} else {
-			howMany = parts[i+1] - pos
+			howMany = parts[i+1] - parts[i]
 		}
 
 		line := make(lineString, howMany)