diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reduceDuplicates.js | 1 | ||||
-rwxr-xr-x | bin/reduceOverlap.js | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/bin/reduceDuplicates.js b/bin/reduceDuplicates.js index c9a7769..3e3805b 100755 --- a/bin/reduceDuplicates.js +++ b/bin/reduceDuplicates.js @@ -44,7 +44,6 @@ const index = new Transform({ const key = [ feature.properties['addr:unit'], - feature.properties['addr:housename'], feature.properties['addr:housenumber'], feature.properties['addr:street'], feature.properties['addr:suburb'], diff --git a/bin/reduceOverlap.js b/bin/reduceOverlap.js index 3984296..d74c49c 100755 --- a/bin/reduceOverlap.js +++ b/bin/reduceOverlap.js @@ -73,11 +73,10 @@ const reduce = new Transform({ } else { // mulitple features with the same geometry - // if housename, housenumber, street, suburb, state, postcode are all the same + // if housenumber, street, suburb, state, postcode are all the same // and it's only unit which differs, // and there is an address with no unit // then remove all the unit addresses and add them as addr:flats on the no unit address - const sameHousename = [...new Set(groupedFeatures.map(f => f.properties['addr:housename']))].length <= 1 const sameHousenumber = [...new Set(groupedFeatures.map(f => f.properties['addr:housenumber']))].length <= 1 const sameStreet = [...new Set(groupedFeatures.map(f => f.properties['addr:street']))].length <= 1 const sameSuburb = [...new Set(groupedFeatures.map(f => f.properties['addr:suburb']))].length <= 1 @@ -86,7 +85,7 @@ const reduce = new Transform({ const hasNonUnit = groupedFeatures.map(f => 'addr:unit' in f.properties).includes(false) - if (sameHousename && sameHousenumber && sameStreet && sameSuburb && sameState && samePostcode) { + if (sameHousenumber && sameStreet && sameSuburb && sameState && samePostcode) { if (hasNonUnit) { const nonUnitFeatures = groupedFeatures.filter(f => (!('addr:unit' in f.properties))) if (nonUnitFeatures.length > 1) { |