diff pkg/octree/tin.go @ 2575:59e7a011d347

Morphological differences: Moved TIN clipping to octree package and hide the technical details there.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 Mar 2019 14:50:04 +0100
parents 45d51a49f191
children f5492fda097c
line wrap: on
line diff
--- a/pkg/octree/tin.go	Mon Mar 11 14:36:34 2019 +0100
+++ b/pkg/octree/tin.go	Mon Mar 11 14:50:04 2019 +0100
@@ -46,6 +46,12 @@
 	Max Vertex
 }
 
+func (t *Tin) Clip(polygon *Polygon) map[int32]struct{} {
+	var tree STRTree
+	tree.Build(t)
+	return tree.Clip(polygon)
+}
+
 // FromWKB constructs the TIN from a WKB representation.
 // Shared vertices are identified and referenced by the
 // same index.