aboutsummaryrefslogtreecommitdiff
path: root/bin/conflate.js
diff options
context:
space:
mode:
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 1166fab..7de1fd6 100755
--- a/bin/conflate.js
+++ b/bin/conflate.js
@@ -179,7 +179,7 @@ const conflate = new Transform({
// ignoring case
// ignoring unit for the time being
// ignoring differences between "Foo - Bar Street" and "Foo-Bar Street", these kinds of names are common in country victoria
- return feature.properties['addr:street'] !== null && osmStreet !== null
+ return feature.properties['addr:street'] && osmStreet
&& feature.properties['addr:street'].toLowerCase().replaceAll(' - ', '-') === osmStreet.toLowerCase().replaceAll(' - ', '-')
&& osmHouseNumber !== null && feature.properties['addr:housenumber'].replaceAll(' ', '').toLowerCase() === osmHouseNumber.replaceAll(' ', '').toLowerCase()
&& (('addr:unit' in feature.properties && osmUnit !== null) ? feature.properties['addr:unit'].replaceAll(' ', '') === osmUnit.replaceAll(' ', '') : true)