From 73280f487386fdb7267221c580a3f5b754b5bd4d Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Sat, 21 May 2022 16:36:13 +1000 Subject: only include addr:flats if not too long --- bin/reduceOverlap.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/reduceOverlap.js') 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(',') } -- cgit v1.2.3