Add ability to download cities from overpass
diff --git a/index.js b/index.js
index 7c848ef..1a5a5d5 100644
--- a/index.js
+++ b/index.js
@@ -89,6 +89,13 @@
'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 @@
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 })
diff --git a/osmBoundarySources.json b/osmBoundarySources.json
index affe9b5..a93235c 100644
--- a/osmBoundarySources.json
+++ b/osmBoundarySources.json
@@ -2,5 +2,9 @@
"USA": {
"type": "ISO3166-1",
"code": "US"
+ },
+ "West Wendover": {
+ "type": "city",
+ "name": "West Wendover"
}
}
\ No newline at end of file
diff --git a/timezones.json b/timezones.json
index b617143..7648ad7 100644
--- a/timezones.json
+++ b/timezones.json
@@ -36,6 +36,10 @@
"op": "difference",
"source": "efele",
"id": "America/Tijuana"
+ }, {
+ "op": "difference",
+ "source": "overpass",
+ "id": "city_West Wendover"
}
]
}
\ No newline at end of file