mirror of
https://github.com/Luzifer/gpxhydrant.git
synced 2024-12-22 12:11:17 +00:00
Added more debugging output
This commit is contained in:
parent
ae02981234
commit
0de60d94a7
1 changed files with 10 additions and 0 deletions
10
main.go
10
main.go
|
@ -239,6 +239,10 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
if cfg.Debug {
|
||||
log.Printf("Working on Changeset %d", cs.ID)
|
||||
}
|
||||
|
||||
border := 0.00009 // Equals ~10m using haversine formula
|
||||
mapData, err := osmClient.RetrieveMapObjects(minLon-border, minLat-border, maxLon+border, maxLat+border)
|
||||
if err != nil {
|
||||
|
@ -274,6 +278,9 @@ func main() {
|
|||
log.Printf("[NOOP] Would send a create to OSM (Changeset %d): %#v", cs.ID, h.ToNode())
|
||||
} else {
|
||||
osmClient.SaveNode(h.ToNode(), cs)
|
||||
if cfg.Debug {
|
||||
log.Printf("Created a hydrant: %s", h.Name)
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
@ -296,6 +303,9 @@ func main() {
|
|||
log.Printf("[NOOP] Would send a change to OSM (Changeset %d): To=%#v From=%#v", cs.ID, h.ToNode(), found.ToNode())
|
||||
} else {
|
||||
osmClient.SaveNode(h.ToNode(), cs)
|
||||
if cfg.Debug {
|
||||
log.Printf("Changed a hydrant: %s", h.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue