diff pkg/imports/sr.go @ 5412:34bc6041e61e marking-single-beam

Added a type for class breaks.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 07 Jul 2021 10:58:14 +0200
parents 9822a840d668
children 4ad68ab239b7
line wrap: on
line diff
--- a/pkg/imports/sr.go	Wed Jul 07 09:43:41 2021 +0200
+++ b/pkg/imports/sr.go	Wed Jul 07 10:58:14 2021 +0200
@@ -923,7 +923,7 @@
 			heights = append(heights, h)
 		}
 	} else {
-		heights = mesh.ExtrapolateClassBreaks(heights, minZ, maxZ)
+		heights = heights.ExtrapolateClassBreaks(minZ, maxZ)
 	}
 
 	/*
@@ -933,7 +933,7 @@
 		log.Printf("%.2f - %.2f\n", tree.Min.Z, tree.Max.Z)
 	*/
 
-	heights = common.DedupFloat64s(heights)
+	heights = heights.Dedup()
 
 	return generateIsoAreas(ctx, tx, feedback, tree, heights, id)
 }
@@ -943,7 +943,7 @@
 	tx *sql.Tx,
 	feedback Feedback,
 	tree *mesh.STRTree,
-	heights []float64,
+	heights mesh.ClassBreaks,
 	id int64,
 ) error {
 	feedback.Info("Generate iso areas")
@@ -975,7 +975,7 @@
 	feedback Feedback,
 	areas []wkb.MultiPolygonGeom,
 	epsg uint32,
-	heights []float64,
+	heights mesh.ClassBreaks,
 	id int64,
 ) error {
 	feedback.Info("Store iso areas.")