aboutsummaryrefslogtreecommitdiff
path: root/lib/filterOSM.js
blob: e5307731acafb75b8f04b153ba5f0230368cde4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}