diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/conflate.js | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/conflate.js b/bin/conflate.js index f2f4b7b..1166fab 100755 --- a/bin/conflate.js +++ b/bin/conflate.js @@ -179,7 +179,8 @@ 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'].toLowerCase().replaceAll(' - ', '-') === osmStreet.toLowerCase().replaceAll(' - ', '-')) +            return feature.properties['addr:street'] !== null && osmStreet !== null +              && 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)            })  | 
