diff options
author | Andrew Harvey <andrew@alantgeo.com.au> | 2021-05-04 16:12:13 +1000 |
---|---|---|
committer | Andrew Harvey <andrew@alantgeo.com.au> | 2021-05-04 16:12:13 +1000 |
commit | 4114f6cc1762573ddf05cf92f2d304dbf04ed04e (patch) | |
tree | 4593ff160cac3c426423d3d0b829a2adb90ca805 /lib/filterOSM.js | |
parent | 5039b0dbf3af3b93466069927d794f5b1c8ccf81 (diff) |
major refactor and improvements
Diffstat (limited to 'lib/filterOSM.js')
-rw-r--r-- | lib/filterOSM.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/filterOSM.js b/lib/filterOSM.js new file mode 100644 index 0000000..e530773 --- /dev/null +++ b/lib/filterOSM.js @@ -0,0 +1,16 @@ +module.exports = (feature, options) => { + + // skip any addresses without either a housenumber or housename + // eg PFI 53396626 has no housenumber + if ( + !('addr:housenumber' in feature.properties) && + !('addr:housename' in feature.properties) + ) { + if (argv.debug) { + console.log(`PFI ${feature.properties._pfi} has neither a addr:housename or addr:housenumber, filtering`) + } + return false + } + + return true +} |