changeset 4642:b5d9647c5bc1 stree-experiment

Fixed construction of clipped STRTree.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 11 Oct 2019 23:36:28 +0200
parents 5ef04ae34872
children a1a9b1eab57c
files pkg/octree/strtree.go
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/octree/strtree.go	Fri Oct 11 20:49:10 2019 +0200
+++ b/pkg/octree/strtree.go	Fri Oct 11 23:36:28 2019 +0200
@@ -92,12 +92,11 @@
 
 	all := make([]int32, 0, len(t.Triangles)-len(remove))
 
-	for i := range all {
+	for i := 0; i < len(t.Triangles); i++ {
 		idx := int32(i)
 		if _, found := remove[idx]; !found {
 			all = append(all, idx)
 		}
-		all[i] = int32(i)
 	}
 
 	s.index = append(s.index, 0)