diff options
-rw-r--r-- | README.md | 12 | ||||
-rwxr-xr-x | bin/reduceDuplicates.js | 1 | ||||
-rwxr-xr-x | bin/reduceOverlap.js | 5 | ||||
-rw-r--r-- | lib/filterOSM.js | 7 | ||||
-rw-r--r-- | lib/toOSM.js | 4 |
5 files changed, 17 insertions, 12 deletions
@@ -77,3 +77,15 @@ Data consumers can still easily explode `addr:flats` out into overlapping nodes ### null values Values `UNNAMED` and `NOT NAMED` appear as street name and locality names. These values are treated as null/empty values rather than proper names. + +### name +Source data contains a field for building / property name. This appears to be a mixed bag sometimes it might fit better as `addr:housename` othertimes simply `name`. Further it's not too clear the distinction between these tags and how house names, property names, building names or the name of the venue at the site should be tagged. + +It's common for the source data to use what we'd consider a description like "Shop", "Public Toilets" or "Reserve". + +For these reasons this building / property name is not included, however it could be a useful point of reference for mappers considering manually adding this data at a later stage. + +### Complex Name +Source data sometimes includes a complex name, for example _CHADSTONE SHOPPING CENTRE_ or _MELBOURNE UNIVERSITY_. These attributes are not used as these names should appear on the actual feature like `shop=mall` or `amenity=university`. + +They might be of interest for mappers as an additional data source, externally to this import. 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) { diff --git a/lib/filterOSM.js b/lib/filterOSM.js index e530773..f7f22be 100644 --- a/lib/filterOSM.js +++ b/lib/filterOSM.js @@ -1,13 +1,12 @@ module.exports = (feature, options) => { - // skip any addresses without either a housenumber or housename + // skip any addresses without a housenumber // eg PFI 53396626 has no housenumber if ( - !('addr:housenumber' in feature.properties) && - !('addr:housename' in feature.properties) + !('addr:housenumber' in feature.properties) ) { if (argv.debug) { - console.log(`PFI ${feature.properties._pfi} has neither a addr:housename or addr:housenumber, filtering`) + console.log(`PFI ${feature.properties._pfi} has no addr:housenumber, filtering`) } return false } diff --git a/lib/toOSM.js b/lib/toOSM.js index 2a5c75c..95c387f 100644 --- a/lib/toOSM.js +++ b/lib/toOSM.js @@ -119,10 +119,6 @@ module.exports = (sourceFeature, options) => { } */ - if (sourceProperties.BUILDING) { - outputProperties['addr:housename'] = sourceProperties.BUILDING - } - // house_* const house_1 = [ sourceProperties.HSE_PREF1, |