diff options
author | Andrew Harvey <andrew@alantgeo.com.au> | 2021-06-18 15:37:45 +1000 |
---|---|---|
committer | Andrew Harvey <andrew@alantgeo.com.au> | 2021-06-18 15:37:45 +1000 |
commit | d979aeb8e311ba3970c77a57b07ec1dea622b39f (patch) | |
tree | e0dea114966910d10875fe5a7bd66f2ee9e33c5b /bin/reduceOverlap.js | |
parent | dfc9041eb086e32b00f597bc1aebb284946d412f (diff) |
Where one of the range endpoints is mapped with `addr:flats` and the range itself has no `addr:flats` then the range is removed (for example at _116 Anderson Street, South Yarra_)
Diffstat (limited to 'bin/reduceOverlap.js')
-rwxr-xr-x | bin/reduceOverlap.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/reduceOverlap.js b/bin/reduceOverlap.js index 90ca036..7414241 100755 --- a/bin/reduceOverlap.js +++ b/bin/reduceOverlap.js @@ -1,5 +1,9 @@ #!/usr/bin/env node +/** + * Reduce overlapping features which can be combined together into a single feature. + */ + const fs = require('fs') const { Readable, Transform, pipeline } = require('stream') const ndjson = require('ndjson') @@ -85,7 +89,7 @@ const reduce = new Transform({ // multiple features with the same geometry // group by housenumber, street, suburb, state, postcode to reduce units into addr:flats - // groupedFeatures all all the features at the same point + // groupedFeatures is all the features at the same point const featuresGroupByNonUnit = {} groupedFeatures.forEach(feature => { const key = [ @@ -175,7 +179,9 @@ const reduce = new Transform({ }) /** - * limit values + * Per https://wiki.openstreetmap.org/wiki/API_v0.6#Maximum_string_lengths + * tag values are limited to 255 characters. Because some addr:flats values can + * exceed this, they are split into addr:flatsN tags. */ let limitValuesIndex = 0 const limitValues = new Transform({ |