From 2b15732a5f1fb77d2121b0467db634da6dd1c9fb Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Fri, 17 May 2013 17:08:33 +0200 Subject: [PATCH] silence missing node/ways warnings --- geom/multipolygon.go | 5 +---- goposm.go | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/geom/multipolygon.go b/geom/multipolygon.go index 7980a45..b67a89c 100644 --- a/geom/multipolygon.go +++ b/geom/multipolygon.go @@ -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 { diff --git a/goposm.go b/goposm.go index eafc93a..f945455 100644 --- a/goposm.go +++ b/goposm.go @@ -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