diff options
author | Andrew Harvey <andrew@alantgeo.com.au> | 2021-06-09 15:31:02 +1000 |
---|---|---|
committer | Andrew Harvey <andrew@alantgeo.com.au> | 2021-06-09 15:31:02 +1000 |
commit | 73b447f31e78978849524bacf31d2a2a1c56d293 (patch) | |
tree | 60f1aed78ef249005c8c68995feda9158a464d6b | |
parent | 5baa1376a1b44bb7a57b31513f45a9a30da869fd (diff) |
hide addr:unit:prefix behind a flag
-rw-r--r-- | lib/toOSM.js | 19 |
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 } |