comparison cmd/octree2contour/main.go @ 932:ae1531e00344

Merged line merging from geo-style branch into default (where it belongs).
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 08 Oct 2018 14:52:37 +0200
parents 52cb0b82b490
children
comparison
equal deleted inserted replaced
930:71445b091415 932:ae1531e00344
33 line := t.IntersectHorizontal(h) 33 line := t.IntersectHorizontal(h)
34 if len(line) > 1 { 34 if len(line) > 1 {
35 lines = append(lines, line) 35 lines = append(lines, line)
36 } 36 }
37 }) 37 })
38 lines = lines.Merge()
38 results <- result{h, lines} 39 results <- result{h, lines}
39 } 40 }
40 } 41 }
41 42
42 func process(tree *octree.Tree) []result { 43 func process(tree *octree.Tree) []result {
47 line := t.IntersectHorizontal(*step) 48 line := t.IntersectHorizontal(*step)
48 if len(line) > 0 { 49 if len(line) > 0 {
49 lines = append(lines, line) 50 lines = append(lines, line)
50 } 51 }
51 }) 52 })
53 lines = lines.Merge()
52 return []result{{*step, lines}} 54 return []result{{*step, lines}}
53 } 55 }
54 56
55 results := make(chan result) 57 results := make(chan result)
56 done := make(chan struct{}) 58 done := make(chan struct{})