Mercurial > gemma
diff cmd/octreediff/main.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 | 2833ff156cb2 |
children | 647a58ee9ae9 |
line wrap: on
line diff
--- a/cmd/octreediff/main.go Mon Mar 11 14:36:34 2019 +0100 +++ b/cmd/octreediff/main.go Mon Mar 11 14:50:04 2019 +0100 @@ -234,19 +234,11 @@ log.Printf("triangulation took %v\n", now.Sub(last)) last = now - var str octree.STRTree - tin := tri.Tin() - str.Build(tin) - + removed := tin.Clip(clippingPolygon) now = time.Now() - log.Printf("building STR tree took %v\n", now.Sub(last)) - last = now - - removed := str.Clip(clippingPolygon) - now = time.Now() - log.Printf("clipping STR tree took %v\n", now.Sub(last)) + log.Printf("clipping tin took %v\n", now.Sub(last)) last = now log.Printf("Number of triangles to clip: %d\n", len(removed))