diff pkg/imports/sr.go @ 4256:4ca884dfc470

Prevent heights duplicates in iso line calculations.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 23 Aug 2019 18:02:01 +0200
parents 49564382ffff
children 5cc4042cf07c
line wrap: on
line diff
--- a/pkg/imports/sr.go	Fri Aug 23 16:33:02 2019 +0200
+++ b/pkg/imports/sr.go	Fri Aug 23 18:02:01 2019 +0200
@@ -869,6 +869,8 @@
 		log.Printf("%.2f - %.2f\n", tree.Min.Z, tree.Max.Z)
 	*/
 
+	heights = common.DedupFloat64s(heights)
+
 	octree.DoContours(tree, heights, func(res *octree.ContourResult) {
 		if err == nil && len(res.Lines) > 0 {
 			_, err = stmt.ExecContext(