aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2020-08-14 11:19:42 +0100
committerNeil Fuller <nfuller@google.com>2020-08-14 11:36:01 +0100
commit0180319074b89b5586dae16cad98cb76abfcde9f (patch)
tree0290b567ae035559569123cc4889b7f451ce5c49
parent9336ecd12108eacadbf838016667eb49806b6f38 (diff)
downloadtimezone-boundary-builder-0180319074b89b5586dae16cad98cb76abfcde9f.tar.gz
More fixes related to review feedback
More fixes related to review feedback: 1) Added yargs to package.json, reran npm update (also updates package-lock.json) 2) Added global variables for downloads_dir / dist_dir, which holds the absolute path for argv.downloads_dir / argv.dist_dir after a call to path.resolve(). Switched the code to use them. 3) Fixed hardcoding of "dist/" and "download/" in the zipInputData step. Tested with: $ node --max-old-space-size=8192 index.js \ --downloads_dir=mydownloads \ --dist_dir=mydist \ --included_zones America/New_York America/Chicago
-rw-r--r--index.js48
-rw-r--r--package-lock.json290
-rw-r--r--package.json5
3 files changed, 301 insertions, 42 deletions
diff --git a/index.js b/index.js
index 3425eb5..775ccb6 100644
--- a/index.js
+++ b/index.js
@@ -12,6 +12,7 @@ var jsts = require('jsts')
var rimraf = require('rimraf')
var overpass = require('query-overpass')
var yargs = require('yargs')
+var path = require('path')
const ProgressStats = require('./progressStats')
@@ -55,6 +56,10 @@ const argv = yargs
.alias('help', 'h')
.argv
+// Resolve the arguments with paths so relative paths become absolute.
+let downloads_dir = path.resolve(argv.downloads_dir)
+let dist_dir = path.resolve(argv.dist_dir)
+
// allow building of only a specified zones
let includedZones = []
let excludedZones = []
@@ -202,7 +207,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) {
} else {
query += 'relation'
}
- var boundaryFilename = argv.downloads_dir + '/' + boundaryId + '.json'
+ var boundaryFilename = downloads_dir + '/' + boundaryId + '.json'
var debug = 'getting data for ' + boundaryId
var queryKeys = Object.keys(cfg)
@@ -310,7 +315,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) {
}
var getTzDistFilename = function (tzid) {
- return argv.dist_dir + '/' + tzid.replace(/\//g, '__') + '.json'
+ return dist_dir + '/' + tzid.replace(/\//g, '__') + '.json'
}
/**
@@ -325,7 +330,7 @@ var getTzDistFilename = function (tzid) {
var getDataSource = function (source) {
var geoJson
if (source.source === 'overpass') {
- geoJson = require(argv.downloads_dir + '/' + source.id + '.json')
+ geoJson = require(downloads_dir + '/' + source.id + '.json')
} else if (source.source === 'manual-polygon') {
geoJson = polygon(source.data).geometry
} else if (source.source === 'manual-multipolygon') {
@@ -665,8 +670,8 @@ var addOceans = function (callback) {
}
var combineAndWriteZones = function (callback) {
- var stream = fs.createWriteStream(argv.dist_dir + '/combined.json')
- var streamWithOceans = fs.createWriteStream(argv.dist_dir + '/combined-with-oceans.json')
+ var stream = fs.createWriteStream(dist_dir + '/combined.json')
+ var streamWithOceans = fs.createWriteStream(dist_dir + '/combined-with-oceans.json')
var zones = Object.keys(zoneCfg)
stream.write('{"type":"FeatureCollection","features":[')
@@ -708,11 +713,11 @@ var combineAndWriteZones = function (callback) {
const autoScript = {
makeDownloadsDir: function (cb) {
overallProgress.beginTask('Creating downloads dir')
- safeMkdir(argv.downloads_dir, cb)
+ safeMkdir(downloads_dir, cb)
},
makeDistDir: function (cb) {
overallProgress.beginTask('Creating dist dir')
- safeMkdir(argv.dist_dir, cb)
+ safeMkdir(dist_dir, cb)
},
getOsmBoundaries: ['makeDownloadsDir', function (results, cb) {
overallProgress.beginTask('Downloading osm boundaries')
@@ -720,7 +725,8 @@ const autoScript = {
}],
zipInputData: ['makeDistDir', 'getOsmBoundaries', function (results, cb) {
overallProgress.beginTask('Zipping up input data')
- exec('zip dist/input-data.zip downloads/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb)
+ exec('zip ' + dist_dir + '/input-data.zip ' + downloads_dir
+ + '/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb)
}],
createZones: ['makeDistDir', 'getOsmBoundaries', function (results, cb) {
overallProgress.beginTask('Creating timezone boundaries')
@@ -750,8 +756,8 @@ const autoScript = {
return cb()
}
overallProgress.beginTask('Zipping geojson')
- let zipFile = argv.dist_dir + '/timezones.geojson.zip'
- let jsonFile = argv.dist_dir + '/combined.json'
+ let zipFile = dist_dir + '/timezones.geojson.zip'
+ let jsonFile = dist_dir + '/combined.json'
exec('zip ' + zipFile + ' ' + jsonFile, cb)
}],
zipGeoJsonWithOceans: ['mergeZones', function (results, cb) {
@@ -760,8 +766,8 @@ const autoScript = {
return cb()
}
overallProgress.beginTask('Zipping geojson with oceans')
- let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip'
- let jsonFile = argv.dist_dir + '/combined-with-oceans.json'
+ let zipFile = dist_dir + '/timezones-with-oceans.geojson.zip'
+ let jsonFile = dist_dir + '/combined-with-oceans.json'
exec('zip ' + zipFile + ' ' + jsonFile, cb)
}],
makeShapefile: ['mergeZones', function (results, cb) {
@@ -770,15 +776,15 @@ const autoScript = {
return cb()
}
overallProgress.beginTask('Converting from geojson to shapefile')
- let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*'
+ let shapeFileGlob = dist_dir + '/combined-shapefile.*'
rimraf.sync(shapeFileGlob)
- let shapeFile = argv.dist_dir + '/combined-shapefile.shp'
- let jsonFile = argv.dist_dir + '/combined.json'
+ let shapeFile = dist_dir + '/combined-shapefile.shp'
+ let jsonFile = dist_dir + '/combined.json'
exec(
'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile,
function (err, stdout, stderr) {
if (err) { return cb(err) }
- let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip'
+ let shapeFileZip = dist_dir + '/timezones.shapefile.zip'
exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb)
}
)
@@ -789,15 +795,15 @@ const autoScript = {
return cb()
}
overallProgress.beginTask('Converting from geojson with oceans to shapefile')
- let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*'
+ let shapeFileGlob = dist_dir + '/combined-shapefile-with-oceans.*'
rimraf.sync(shapeFileGlob)
- let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp'
- let jsonFile = argv.dist_dir + '/combined-with-oceans.json'
+ let shapeFile = dist_dir + '/combined-shapefile-with-oceans.shp'
+ let jsonFile = dist_dir + '/combined-with-oceans.json'
exec(
'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile,
function (err, stdout, stderr) {
if (err) { return cb(err) }
- let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip'
+ let shapeFileZip = dist_dir + '/timezones-with-oceans.shapefile.zip'
exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb)
}
)
@@ -815,7 +821,7 @@ const autoScript = {
zoneNames = zoneNames.filter(zoneName => excludedZones.indexOf(zoneName) === -1)
}
fs.writeFile(
- argv.dist_dir + '/timezone-names.json',
+ dist_dir + '/timezone-names.json',
JSON.stringify(zoneNames),
cb
)
diff --git a/package-lock.json b/package-lock.json
index 3c2b085..ec54baa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -53,6 +53,11 @@
"@turf/helpers": "6.x"
}
},
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
+ },
"@types/unist": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",
@@ -273,6 +278,11 @@
"integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=",
"dev": true
},
+ "camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
+ },
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
@@ -315,6 +325,46 @@
"integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
"dev": true
},
+ "cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
+ }
+ },
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -401,6 +451,11 @@
"integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=",
"dev": true
},
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
+ },
"deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
@@ -486,6 +541,11 @@
"safer-buffer": "^2.1.0"
}
},
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ },
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@@ -1024,6 +1084,11 @@
}
}
},
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
+ },
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
@@ -1419,9 +1484,9 @@
}
},
"jsts": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.1.2.tgz",
- "integrity": "sha512-9Mw/vKxnLHw5WX6c67Hvo4jxRkP3jDlVfRl3HK3P71EoSLFM7VkjZQh/2Utj7hf2IX6x/M7UYrkPjrmqlLMNQA=="
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.5.0.tgz",
+ "integrity": "sha512-r7CPjky5ZnhST9vwtVsNxaA9ghnt74u2w19Uo4c5ZUTaNaatDV63wDyD9BA2bfgEDwbppB7kRUs5TYSImqScPg=="
},
"jsx-ast-utils": {
"version": "2.2.1",
@@ -1482,9 +1547,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
},
"loose-envify": {
@@ -1755,9 +1820,9 @@
"dev": true
},
"pako": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz",
- "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw=="
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
},
"parse-headers": {
"version": "2.0.2",
@@ -1924,12 +1989,12 @@
"dev": true
},
"proj4": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.5.0.tgz",
- "integrity": "sha512-XZTRT7OPdLzgvtTqL8DG2cEj8lYdovztOwiwpwRSYayOty5Ipf3H68dh/fiL+HKDEyetmQSMhkkMGiJoyziz3w==",
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.6.2.tgz",
+ "integrity": "sha512-Pn0+HZtXb4JzuN8RR0VM7yyseegiYHbXkF+2FOdGpzRojcZ1BTjWxOh7qfp2vH0EyLu8pvcrhLxidwzgyUy/Gw==",
"requires": {
"mgrs": "1.0.0",
- "wkt-parser": "^1.2.0"
+ "wkt-parser": "^1.2.4"
}
},
"prop-types": {
@@ -2079,6 +2144,16 @@
"uuid": "^3.3.2"
}
},
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
+ },
+ "require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
+ },
"require-uncached": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
@@ -2162,6 +2237,11 @@
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
},
+ "set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+ },
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
@@ -2178,9 +2258,9 @@
"dev": true
},
"shpjs": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.4.3.tgz",
- "integrity": "sha512-NZM75+SLgPt9dK91Z92QK+fVd2OR6zswAmkTrkHRc4mnONbAWGo38I+AxCYsKgCNfqF5cZUi2KfO7r2TZ+tHdw==",
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.5.0.tgz",
+ "integrity": "sha512-v21xnhMuvIdU+lcm9rLBZcA/PSwYfv1nfeNcgh6KbGygRnCt0wvyLnm1NbAl0wN45gP+qT7fkM414ukXXReTXQ==",
"requires": {
"jszip": "^2.4.0",
"lie": "^3.0.1",
@@ -2584,16 +2664,83 @@
"isexe": "^2.0.0"
}
},
+ "which-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
+ },
"wkt-parser": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.3.tgz",
- "integrity": "sha512-s7zrOedGuHbbzMaQOuf8HacuCYp3LmmrHjkkN//7UEAzsYz7xJ6J+j/84ZWZkQcrRqi3xXyuc4odPHj7PEB0bw=="
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.4.tgz",
+ "integrity": "sha512-ZzKnc7ml/91fOPh5bANBL4vUlWPIYYv11waCtWTkl2TRN+LEmBg60Q1MA8gqV4hEp4MGfSj9JiHz91zw/gTDXg=="
},
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
},
+ "wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
+ }
+ },
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -2628,6 +2775,111 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
+ },
+ "y18n": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
+ },
+ "yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "requires": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
+ }
+ },
+ "yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
}
}
}
diff --git a/package.json b/package.json
index 908b68f..dffc1e6 100644
--- a/package.json
+++ b/package.json
@@ -25,10 +25,11 @@
"@turf/bbox": "^6.0.1",
"@turf/helpers": "^6.1.4",
"async": "^3.2.0",
- "jsts": "^2.1.2",
+ "jsts": "^2.5.0",
"query-overpass": "^1.5.5",
"rimraf": "^2.7.1",
- "shpjs": "^3.4.3"
+ "shpjs": "^3.5.0",
+ "yargs": "^15.4.1"
},
"devDependencies": {
"standard": "^12.0.1"