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