aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/conflate.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/conflate.js b/bin/conflate.js
index 7c3e222..ca54bff 100755
--- a/bin/conflate.js
+++ b/bin/conflate.js
@@ -15,6 +15,10 @@ const centroid = require('@turf/centroid').default
const booleanIntersects = require('@turf/boolean-intersects').default
const argv = require('yargs/yargs')(process.argv.slice(2))
+ .option('debug', {
+ type: 'boolean',
+ description: 'Include debugging attributes on outputs'
+ })
.option('verbose', {
type: 'boolean',
description: 'Verbose logging'
@@ -183,8 +187,10 @@ const conflate = new Transform({
const osmPoly = results ? (results.type === 'FeatureCollection' ? (results.features ? results.features[0] : null) : results) : null
if (osmPoly) {
// address found within an existing OSM address polygon
- feature.properties._osmtype = osmPoly.properties['@type']
- feature.properties._osmid = osmPoly.properties['@id']
+ if (argv.debug) {
+ feature.properties._osmtype = osmPoly.properties['@type']
+ feature.properties._osmid = osmPoly.properties['@id']
+ }
outputStreams.withinExistingOSMAddressPoly.write(feature)