aboutsummaryrefslogtreecommitdiff
path: root/bin/reduceOverlap.js
diff options
context:
space:
mode:
authorAndrew Harvey <andrew@alantgeo.com.au>2022-05-21 16:36:13 +1000
committerAndrew Harvey <andrew@alantgeo.com.au>2022-05-21 16:36:13 +1000
commit73280f487386fdb7267221c580a3f5b754b5bd4d (patch)
treec73a8ce616060e02a89a0ae893ce19d932e9329d /bin/reduceOverlap.js
parent1d94ced0ae9f5d511768e07f5c8c1a66625452e9 (diff)
only include addr:flats if not too long
Diffstat (limited to 'bin/reduceOverlap.js')
-rwxr-xr-xbin/reduceOverlap.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/reduceOverlap.js b/bin/reduceOverlap.js
index cc73bed..2da84ec 100755
--- a/bin/reduceOverlap.js
+++ b/bin/reduceOverlap.js
@@ -177,7 +177,10 @@ const reduce = new Transform({
this.push(retainedFeature)
} else {
const flats = unitsToRanges(allOtherUnits, argv.verbose && featureGroup)
- nonUnitFeature.properties['addr:flats'] = flats
+ // because OSM carto will render addr:flats regardless of length for the time being if there would be too many flat ranges then don't include addr:flats at all
+ if (flats.split(';').length <= 2) {
+ nonUnitFeature.properties['addr:flats'] = flats
+ }
if (nonUnitFeature.properties._pfi) {
nonUnitFeature.properties._pfi = featureGroup.map(f => f.properties._pfi).join(',')
}