diff options
author | evansiroky <evan.siroky@yahoo.com> | 2016-06-17 08:37:51 -0700 |
---|---|---|
committer | evansiroky <evan.siroky@yahoo.com> | 2016-06-17 08:37:51 -0700 |
commit | 5d008130cf67d2c5ef831b4d59fca2ef563aed28 (patch) | |
tree | 9daa78125230d39f7ed23e5f6b23cfb855d9cc66 /index.js | |
parent | 35f6434011b38b3ba60cfbcabf2d64e5b3e557d3 (diff) | |
download | timezone-boundary-builder-5d008130cf67d2c5ef831b4d59fca2ef563aed28.tar.gz |
Add ability to download cities from overpass
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -89,6 +89,13 @@ var downloadOsmBoundary = function(boundaryId, boundaryCallback) { 'out body;>;out meta qt;' boundaryFilename += '_' + cfg.code debug += 'country: ' + cfg.code + } else if(cfg.type === 'city') { + query += '(relation["boundary"="administrative"]' + + '["admin_level"="8"]' + + '["name"="' + cfg.name + '"]);' + + 'out body;>;out meta qt;' + boundaryFilename += '_' + cfg.name + debug += 'city: ' + cfg.name } boundaryFilename += '.json' @@ -96,7 +103,7 @@ var downloadOsmBoundary = function(boundaryId, boundaryCallback) { console.log(debug) async.auto({ - downloadFromOverpass: function(results, cb) { + downloadFromOverpass: function(cb) { console.log('downloading from overpass') fetchIfNeeded(boundaryFilename, boundaryCallback, function() { overpass(query, cb, { flatProperties: true }) |