From a7329b5968caa79a6623a0bc57007327f8db59f9 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Wed, 19 May 2021 23:22:45 +1000 Subject: progress indicator for osm address polygon index --- bin/conflate.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin/conflate.js') diff --git a/bin/conflate.js b/bin/conflate.js index 2330a7a..cec1d83 100755 --- a/bin/conflate.js +++ b/bin/conflate.js @@ -229,7 +229,14 @@ pipeline( console.log(`Index OSM Address Polygons within each block`) // for each OSM address polygon + let osmAddrPolygonIndex = 0 for (const osmAddrPolygon of osmAddrPolygons) { + osmAddrPolygonIndex++ + + if (process.stdout.isTTY && osmAddrPolygonIndex % 1000 === 0) { + process.stdout.write(` ${osmAddrPolygonIndex.toLocaleString()}\r`) + } + // find the blocks it might intersect const candidateBlocks = blockIndex.search(...bbox(osmAddrPolygon)) // then test if it actually intersects -- cgit v1.2.3