diff options
author | Andrew Harvey <andrew@alantgeo.com.au> | 2021-05-19 23:22:45 +1000 |
---|---|---|
committer | Andrew Harvey <andrew@alantgeo.com.au> | 2021-05-19 23:22:45 +1000 |
commit | a7329b5968caa79a6623a0bc57007327f8db59f9 (patch) | |
tree | 5dd12e0e54cf9f61163661bd3c516e64c2c34d30 | |
parent | fd1c34c07700b5cc501452a7be7b709bc4dc65d5 (diff) |
progress indicator for osm address polygon index
-rwxr-xr-x | bin/conflate.js | 7 |
1 files changed, 7 insertions, 0 deletions
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 |