aboutsummaryrefslogtreecommitdiff
path: root/bin/conflate.js
diff options
context:
space:
mode:
authorAndrew Harvey <andrew@alantgeo.com.au>2021-06-21 16:58:04 +1000
committerAndrew Harvey <andrew@alantgeo.com.au>2021-06-21 16:58:04 +1000
commit46318c340f6cb2b68cc51940d18e9ffa7f8dcb07 (patch)
tree7ff4781cec48ff40de0f6e5b309bdd65c6766bca /bin/conflate.js
parentb543964a8b7bec12d719765d4df59068d50b9565 (diff)
ignore - when comparing street names because of the differences between osm and vicmap
Diffstat (limited to 'bin/conflate.js')
-rwxr-xr-xbin/conflate.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/conflate.js b/bin/conflate.js
index 3cbd11a..518ccb3 100755
--- a/bin/conflate.js
+++ b/bin/conflate.js
@@ -181,7 +181,7 @@ const conflate = new Transform({
// ignoring case
// ignoring differences between "Foo - Bar Street" and "Foo-Bar Street", these kinds of names are common in country victoria
const isMatched = feature.properties['addr:street'] && osmStreet
- && feature.properties['addr:street'].toLowerCase().replaceAll(' - ', '-') === osmStreet.toLowerCase().replaceAll(' - ', '-')
+ && feature.properties['addr:street'].toLowerCase().replaceAll(' - ', '-').replaceAll('-', '') === osmStreet.toLowerCase().replaceAll(' - ', '-').replaceAll('-', '')
&& osmHouseNumber !== null && feature.properties['addr:housenumber'].replaceAll(' ', '').toLowerCase() === osmHouseNumber.replaceAll(' ', '').toLowerCase()
&& (vicmapUnit === osmUnit)