changeset 4732:7083fd1da169 stack-polygons

Made shell clockwise and holes counter clockwise.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Oct 2019 01:41:24 +0200
parents dc0db4ede3b1
children 1c205bb3d0fd
files pkg/octree/areas.go
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/octree/areas.go	Fri Oct 18 00:16:12 2019 +0200
+++ b/pkg/octree/areas.go	Fri Oct 18 01:41:24 2019 +0200
@@ -410,7 +410,7 @@
 			x, y := reproj(pt.X, pt.Y)
 			shell[j] = wkb.PointGeom{X: x, Y: y}
 		}
-		if !shell.CCW() {
+		if shell.CCW() {
 			shell.Reverse()
 		}
 		polygon[0] = shell
@@ -422,7 +422,7 @@
 				x, y := reproj(pt.X, pt.Y)
 				hole[j] = wkb.PointGeom{X: x, Y: y}
 			}
-			if hole.CCW() {
+			if !hole.CCW() {
 				hole.Reverse()
 			}
 			polygon[1+i] = hole