Skip to content

Commit

Permalink
Merge pull request #48 from ibi-group/osm-progress-logging
Browse files Browse the repository at this point in the history
Osm progress logging
  • Loading branch information
evansiroky authored Aug 31, 2020
2 parents 4b09f96 + ee67864 commit dc18b16
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public void buildGraph(Graph graph, GraphBuilderModuleSummary graphBuilderModule
if (readCachedElevations) {
// try to load in the cached elevation data
try {
log.info("Loading cached elevation data into memory");
Kryo kryo = makeKryo();
Input input = new Input(new FileInputStream(cachedElevationsFile));
cachedElevations = (HashMap<String, PackedCoordinateSequence>) kryo.readClassAndObject(input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ public void addNode(OSMNode node) {

nodesById.put(node.getId(), node);

if (nodesById.size() % 100000 == 0)
LOG.debug("nodes=" + nodesById.size());
if (nodesById.size() % 1000000 == 0)
LOG.info("Read {} nodes from OSM file.", nodesById.size());
}

@Override
Expand Down Expand Up @@ -226,8 +226,8 @@ public void addWay(OSMWay way) {

waysById.put(wayId, way);

if (waysById.size() % 10000 == 0)
LOG.debug("ways=" + waysById.size());
if (waysById.size() % 100000 == 0)
LOG.info("Read {} routeable ways from OSM file.", waysById.size());
}

@Override
Expand Down Expand Up @@ -260,8 +260,8 @@ public void addRelation(OSMRelation relation) {

relationsById.put(relation.getId(), relation);

if (relationsById.size() % 100 == 0)
LOG.debug("relations=" + relationsById.size());
if (relationsById.size() % 1000 == 0)
LOG.info("Read {} relations from OSM file.", relationsById.size());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ private void buildBasicGraph() {
for (OSMWay way : ways) {

if (wayIndex % 50000 == 0)
LOG.info("ways=" + wayIndex + "/" + wayCount);
LOG.info("Building graph from {} / {} ways.", wayIndex, wayCount);
wayIndex++;

WayProperties wayData = wayPropertySet.getDataForWay(way);
Expand Down

0 comments on commit dc18b16

Please sign in to comment.