aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/building.js4
-rwxr-xr-xbin/candidates.js8
-rwxr-xr-xbin/conflate.js2
3 files changed, 8 insertions, 6 deletions
diff --git a/bin/building.js b/bin/building.js
index 2b18aad..f991be2 100755
--- a/bin/building.js
+++ b/bin/building.js
@@ -72,6 +72,7 @@ outputKeys.forEach(key => {
})
let sourceCount = 0
+let exactMatchCount = 0
const conflate = new Transform({
readableObjectMode: true,
writableObjectMode: true,
@@ -108,7 +109,7 @@ const conflate = new Transform({
// a single nearby OSM features found with similar name
if (nearbyMatchedFeatures[0].properties.name.toLowerCase() === name.toLowerCase()) {
// name exactly matched
- console.log(`Exact match: ${properties.name} = ${nearbyMatchedFeatures[0].properties.name}`)
+ exactMatchCount++
} else {
// name was similar but not an exact match
// create a MapRoulette task to investigate further
@@ -163,6 +164,7 @@ pipeline(
console.log(err)
process.exit(1)
} else {
+ console.log(`${exactMatchCount} Vicmap building names exactly matched OSM features`)
outputKeys.forEach(key => {
outputStreams[key].end()
diff --git a/bin/candidates.js b/bin/candidates.js
index e350f6f..6e2e7b0 100755
--- a/bin/candidates.js
+++ b/bin/candidates.js
@@ -145,7 +145,7 @@ function outputCandidates() {
}
// first pass to index by geometry
-console.log('Step 1/X: Reading suburbs')
+console.log('Step 1/4: Reading suburbs')
pipeline(
fs.createReadStream(suburbsFile),
ndjson.parse(),
@@ -155,13 +155,13 @@ pipeline(
console.log(err)
process.exit(1)
} else {
- console.log('Step 2/X: Creating index of Suburbs')
+ console.log('Step 2/4: Creating index of Suburbs')
lookupSuburbs = new PolygonLookup({
type: 'FeatureCollection',
features: suburbs
})
- console.log('Step 3/X: noOSMAddressWithinBlock')
+ console.log('Step 3/4: noOSMAddressWithinBlock')
pipeline(
fs.createReadStream(path.join(conflatePath, 'noOSMAddressWithinBlock.geojson')),
ndjson.parse(),
@@ -172,7 +172,7 @@ pipeline(
process.exit(1)
} else {
- console.log('Step 4/X: noExactMatch')
+ console.log('Step 4/4: noExactMatch')
pipeline(
fs.createReadStream(path.join(conflatePath, 'noExactMatch.geojson')),
ndjson.parse(),
diff --git a/bin/conflate.js b/bin/conflate.js
index c64706f..c2eb813 100755
--- a/bin/conflate.js
+++ b/bin/conflate.js
@@ -141,7 +141,7 @@ const conflate = new Transform({
} else {
// other OSM addresses found within this block, so need to conflate
if (!('id' in block)) {
- console.error('Expected id for block')
+ console.error('Expected id for block, maybe you are missing the polygon-lookup patch, try cp src/polygon-lookup-patch.js node_modules/polygon-lookup/index.js')
process.exit(1)
}