aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}