mirror of
https://github.com/Luzifer/gpxhydrant.git
synced 2024-12-23 04:31:18 +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
|
border := 0.00009 // Equals ~10m using haversine formula
|
||||||
mapData, err := osmClient.RetrieveMapObjects(minLon-border, minLat-border, maxLon+border, maxLat+border)
|
mapData, err := osmClient.RetrieveMapObjects(minLon-border, minLat-border, maxLon+border, maxLat+border)
|
||||||
if err != nil {
|
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())
|
log.Printf("[NOOP] Would send a create to OSM (Changeset %d): %#v", cs.ID, h.ToNode())
|
||||||
} else {
|
} else {
|
||||||
osmClient.SaveNode(h.ToNode(), cs)
|
osmClient.SaveNode(h.ToNode(), cs)
|
||||||
|
if cfg.Debug {
|
||||||
|
log.Printf("Created a hydrant: %s", h.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
continue
|
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())
|
log.Printf("[NOOP] Would send a change to OSM (Changeset %d): To=%#v From=%#v", cs.ID, h.ToNode(), found.ToNode())
|
||||||
} else {
|
} else {
|
||||||
osmClient.SaveNode(h.ToNode(), cs)
|
osmClient.SaveNode(h.ToNode(), cs)
|
||||||
|
if cfg.Debug {
|
||||||
|
log.Printf("Changed a hydrant: %s", h.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue