aboutsummaryrefslogtreecommitdiff
path: root/lib/toOSM.js
diff options
context:
space:
mode:
authorAndrew Harvey <andrew@alantgeo.com.au>2021-06-09 15:31:02 +1000
committerAndrew Harvey <andrew@alantgeo.com.au>2021-06-09 15:31:02 +1000
commit73b447f31e78978849524bacf31d2a2a1c56d293 (patch)
tree60f1aed78ef249005c8c68995feda9158a464d6b /lib/toOSM.js
parent5baa1376a1b44bb7a57b31513f45a9a30da869fd (diff)
hide addr:unit:prefix behind a flag
Diffstat (limited to 'lib/toOSM.js')
-rw-r--r--lib/toOSM.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/toOSM.js b/lib/toOSM.js
index e96568c..86c08e5 100644
--- a/lib/toOSM.js
+++ b/lib/toOSM.js
@@ -59,19 +59,18 @@ module.exports = (sourceFeature, options) => {
}
if (bld_unit) {
- // building unit type (Unit, Shop, Suite...)
- // only included if a unit value is set
- /* currently ommitted
- if (sourceProperties.BLGUNTTYP) {
- if (sourceProperties.BLGUNTTYP in buildingUnitType) {
- outputProperties['addr:unit:prefix'] = capitalCase(buildingUnitType[sourceProperties.BLGUNTTYP])
- } else {
- if (options && options.debug) {
- console.log(`Building Unity Type ${sourceProperties.BLGUNTTYP} not recognised for ${sourceFeature}`)
+ if (options && options.includeUnitPrefix) {
+ // building unit type (Unit, Shop, Suite...)
+ if (sourceProperties.BLGUNTTYP) {
+ if (sourceProperties.BLGUNTTYP in buildingUnitType) {
+ outputProperties['addr:unit:prefix'] = capitalCase(buildingUnitType[sourceProperties.BLGUNTTYP])
+ } else {
+ if (options && options.debug) {
+ console.log(`Building Unity Type ${sourceProperties.BLGUNTTYP} not recognised for ${sourceFeature}`)
+ }
}
}
}
- */
outputProperties['addr:unit'] = bld_unit
}