comparison 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
comparison
equal deleted inserted replaced
4254:f1f1395f141b 4256:4ca884dfc470
867 fmt.Printf("%d %.2f\n", i, v) 867 fmt.Printf("%d %.2f\n", i, v)
868 } 868 }
869 log.Printf("%.2f - %.2f\n", tree.Min.Z, tree.Max.Z) 869 log.Printf("%.2f - %.2f\n", tree.Min.Z, tree.Max.Z)
870 */ 870 */
871 871
872 heights = common.DedupFloat64s(heights)
873
872 octree.DoContours(tree, heights, func(res *octree.ContourResult) { 874 octree.DoContours(tree, heights, func(res *octree.ContourResult) {
873 if err == nil && len(res.Lines) > 0 { 875 if err == nil && len(res.Lines) > 0 {
874 _, err = stmt.ExecContext( 876 _, err = stmt.ExecContext(
875 ctx, 877 ctx,
876 id, res.Height, tree.EPSG, 878 id, res.Height, tree.EPSG,