diff options
author | Andrew Harvey <andrew@alantgeo.com.au> | 2021-06-21 16:58:04 +1000 |
---|---|---|
committer | Andrew Harvey <andrew@alantgeo.com.au> | 2021-06-21 16:58:04 +1000 |
commit | 46318c340f6cb2b68cc51940d18e9ffa7f8dcb07 (patch) | |
tree | 7ff4781cec48ff40de0f6e5b309bdd65c6766bca | |
parent | b543964a8b7bec12d719765d4df59068d50b9565 (diff) |
ignore - when comparing street names because of the differences between osm and vicmap
-rwxr-xr-x | bin/conflate.js | 2 |
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) |