silence missing node/ways warnings
parent
bec1509975
commit
2b15732a5f
|
@ -2,7 +2,6 @@ package geom
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"goposm/element"
|
"goposm/element"
|
||||||
"goposm/geom/geos"
|
"goposm/geom/geos"
|
||||||
"sort"
|
"sort"
|
||||||
|
@ -52,9 +51,7 @@ func BuildRings(rel *element.Relation) ([]*Ring, error) {
|
||||||
// merge incomplete rings
|
// merge incomplete rings
|
||||||
mergedRings := mergeRings(incompleteRings)
|
mergedRings := mergeRings(incompleteRings)
|
||||||
if len(completeRings)+len(mergedRings) == 0 {
|
if len(completeRings)+len(mergedRings) == 0 {
|
||||||
return nil, errors.New(
|
return nil, ErrorNoRing
|
||||||
fmt.Sprintf("linestring from relation %d has no rings", rel.Id),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
// create geometries for merged rings
|
// create geometries for merged rings
|
||||||
for _, ring := range mergedRings {
|
for _, ring := range mergedRings {
|
||||||
|
|
|
@ -280,7 +280,7 @@ func main() {
|
||||||
progress.AddRelations(1)
|
progress.AddRelations(1)
|
||||||
err := osmCache.Ways.FillMembers(r.Members)
|
err := osmCache.Ways.FillMembers(r.Members)
|
||||||
if err == cache.NotFound {
|
if err == cache.NotFound {
|
||||||
fmt.Println("missing ways for relation", r.Id)
|
// fmt.Println("missing ways for relation", r.Id)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
continue
|
continue
|
||||||
|
@ -291,7 +291,7 @@ func main() {
|
||||||
}
|
}
|
||||||
err := osmCache.Coords.FillWay(m.Way)
|
err := osmCache.Coords.FillWay(m.Way)
|
||||||
if err == cache.NotFound {
|
if err == cache.NotFound {
|
||||||
fmt.Println("missing nodes for way", m.Way.Id, "in relation", r.Id)
|
// fmt.Println("missing nodes for way", m.Way.Id, "in relation", r.Id)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue