mirror of
https://github.com/netbymatt/nexrad-level-2-plot.git
synced 2026-11-28 18:28:05 -08:00
Compare commits
11
Commits
non-hi-res
..
v2.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28cfd34bcd | ||
|
|
a3987914bc | ||
|
|
2b8fbbc3b5 | ||
|
|
cab1556cc4 | ||
|
|
2017a6f4ff | ||
|
|
b8389de11f | ||
|
|
dc02fe5f50 | ||
|
|
e9fde8161f | ||
|
|
90025427c6 | ||
|
|
8cea4fb15d | ||
|
|
9b4295e872 |
No files matched your search
@@ -47,15 +47,19 @@ Test code and data is provided in the `./demo` folder. `test.js` can be used to
|
||||
# API
|
||||
|
||||
## plot(data, products, options)
|
||||
Returns an object
|
||||
Returns an array of objects. The order of elevations in the returned array matches the order of elevations in options.elevations
|
||||
``` javascript
|
||||
{
|
||||
REF: {
|
||||
canvas: <Canvas>,
|
||||
palette: <Uint8ClampedArray>
|
||||
[
|
||||
{
|
||||
elevation: <integer>,
|
||||
REF: {
|
||||
canvas: <Canvas>,
|
||||
palette: <Uint8ClampedArray>
|
||||
},
|
||||
//... additional products
|
||||
},
|
||||
//... additional products
|
||||
}
|
||||
// ... additional elevations
|
||||
]
|
||||
```
|
||||
The first level key in the returned object represents each requested product.
|
||||
> Note: Each product may return false if no data was found for the specified elevation and product.
|
||||
@@ -73,6 +77,8 @@ options.cropTo|integer|3600|1 to 3600. After scaling and downsampling as describ
|
||||
options.background|string|#000000|Background color of the image. This can be transparent by using #RGBA notation. See [ctx.fillStyle](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more information.
|
||||
options.lineWidth|integer|2|The raster image is created by drawing several arcs at the locations and colors specified in the data file. When scaling down you may get a better looking image by adjusting this value to something large than the default.
|
||||
options.palettize|boolean\|object|false|After drawing the image convert the image from RGBA to a palettized image. When true the same palette as the product is used. Additional options are described in [palettizing](#palettizing). This can significantly reduce the size of the resulting image with minimal loss of clarity.
|
||||
options.elevations|undefined\|integer\|Array of integers|undefined|The specific elevations to plot. If undefined (default) all available elevations will be plotted. If an integer is provided a single elevation will be plotted with all the selected ```products```. If an array of integers are provided each ```products``` in each elevation will be plotted. Note that when a product and elevation combination do not exist the returned object will have false in the missing location. This is common where elevation 1 will have reflectivity data and elevation 2 (altough at the same angle as elevation 1) will contain velocity data.
|
||||
options.usePreferredWaveforms|boolean|true|Waveform types of 1, 2, 3, 4 and 5 are produced by the radar. Type 1 is typically exclusive to reflectivity, Type 2 is typically exclusive to velocity however it also produces reflectivity data. Types 3, 4 and 5 all produce both velocity and reflectivity. When set to true type 1 waveforms will not plot velocity data, and type 2 waveforms will not plot reflectivity data. If you must see all information set this to false.
|
||||
|
||||
### Downsampling
|
||||
A full size plot is 3600 x 3600 pixels. This corresponds to the maximum range of the radar 460km (~250 mi) * maximum resolution 0.25 mi/bin * 2 (east and west side of radar).
|
||||
@@ -108,6 +114,11 @@ data|{canvas[palette]}|Typically the output of [plot()](#plotfile-options).\<pro
|
||||
|
||||
# Notable and breaking changes
|
||||
|
||||
## v2.0.0 Breaking, returns an array of objects
|
||||
Previously, a single elevation would be plotted by the routine. The elevation was selected by ```options.elevation```. ```options.elevation``` has been renamed to ```options.elevations``` and will still take a single integer as an input, but in this configuration an array is still returned. The simplest way to return to the functionality of v1.1.0 is ```plot(data,products,{elevation: <integer>})[0]``` which will return only the first object in the array.
|
||||
|
||||
```options.elevations``` defaults to all the elevations in the provided file. This may not be the desired behavior, and will take significantly longer to plot if you do not need all of the data provided. You can query ```data.listElevations()``` to return an array of available elevations. The result can be passed directly to options.elevations or further processed to only select interesting elevations before calling ```plot()```. Additional details of ```options.elevations``` are provided above.
|
||||
|
||||
## v1.1.0 Notable, RRLE pre-processing
|
||||
Testing and monitoring of this package in production showed that drawing each 0.5° or 1.0° arc as part of the plotting process was very time-expensive. Drawing a wider arc when adjacent radials had the same color at this position was significantly faster than drawing the two separate arcs.
|
||||
|
||||
|
||||
Binary file not shown.
+9
-10
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
const { Level2Radar } = require('nexrad-level-2-data');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const glob = require('glob');
|
||||
@@ -20,28 +21,26 @@ files.forEach((file) => {
|
||||
// combine data
|
||||
const radarData = Level2Radar.combineData(chunks);
|
||||
|
||||
// result array by elevations
|
||||
const plots = [];
|
||||
|
||||
const size = 1800;
|
||||
const elevation = 1;
|
||||
|
||||
// plot for each elevation and size
|
||||
(async () => {
|
||||
const start = new Date();
|
||||
for (let i = 0; i < 100; i += 1) {
|
||||
plots[elevation] = plot(radarData, ['REF', 'VEL'], {
|
||||
elevation,
|
||||
const plots = plot(radarData, ['REF', 'VEL'], {
|
||||
size,
|
||||
palettize: true,
|
||||
cropTo: size / 2,
|
||||
});
|
||||
|
||||
// write files to disk
|
||||
await Promise.allSettled([
|
||||
writePngToFile(`./output/REF-${elevation}-${size}--${i}.png`, plots[elevation].REF),
|
||||
writePngToFile(`./output/VEL-${elevation}-${size}--${i}.png`, plots[elevation].VEL),
|
||||
]);
|
||||
const writePromises = [];
|
||||
plots.forEach((p) => {
|
||||
const { elevation } = p;
|
||||
writePromises.push(writePngToFile(`./output/REF-${elevation}-${size}.png`, p.REF));
|
||||
writePromises.push(writePngToFile(`./output/VEL-${elevation}-${size}.png`, p.VEL));
|
||||
});
|
||||
await Promise.allSettled(writePromises);
|
||||
}
|
||||
const end = new Date();
|
||||
console.log(`Total Time: ${(end - start) / 1000}`);
|
||||
|
||||
+14
-17
@@ -14,7 +14,6 @@ const { plot, writePngToFile } = require('../src');
|
||||
// const files = glob.sync('./data/TORD/767/*');
|
||||
const files = glob.sync('./data/KLOT/KLOT20210812_171451_V*'); // ref palette tuning
|
||||
// const files = glob.sync('./data/KLOT/KLOT20210621_041151_V06'); // vel palette tuning
|
||||
// const files = glob.sync('./data/non-hi-res/*');
|
||||
|
||||
// const store each file's data
|
||||
const chunks = [];
|
||||
@@ -28,9 +27,6 @@ files.forEach((file) => {
|
||||
// combine data
|
||||
const radarData = Level2Radar.combineData(chunks);
|
||||
|
||||
// result array by elevations
|
||||
const plots = [];
|
||||
|
||||
// default to all plots unless single is specificed
|
||||
const single = process.argv.includes('single');
|
||||
|
||||
@@ -47,19 +43,20 @@ if (single) {
|
||||
// plot for each elevation and size
|
||||
(async () => {
|
||||
await Promise.allSettled(sizes.map(async (size) => {
|
||||
await Promise.allSettled(elevations.map(async (elevation) => {
|
||||
plots[elevation] = plot(radarData, ['REF', 'VEL'], {
|
||||
elevation,
|
||||
size,
|
||||
palettize: true,
|
||||
cropTo: size / 2,
|
||||
});
|
||||
const plots = plot(radarData, ['REF', 'VEL'], {
|
||||
elevations,
|
||||
size,
|
||||
palettize: true,
|
||||
cropTo: size / 2,
|
||||
});
|
||||
|
||||
// write files to disk
|
||||
await Promise.allSettled([
|
||||
writePngToFile(`./output/REF-${elevation}-${size}.png`, plots[elevation].REF),
|
||||
writePngToFile(`./output/VEL-${elevation}-${size}.png`, plots[elevation].VEL),
|
||||
]);
|
||||
}));
|
||||
// write files to disk
|
||||
const writePromises = [];
|
||||
plots.forEach((p) => {
|
||||
const { elevation } = p;
|
||||
writePromises.push(writePngToFile(`./output/REF-${elevation}-${size}.png`, p.REF));
|
||||
writePromises.push(writePngToFile(`./output/VEL-${elevation}-${size}.png`, p.VEL));
|
||||
});
|
||||
await Promise.allSettled(writePromises);
|
||||
}));
|
||||
})();
|
||||
Generated
+146
-141
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "nexrad-level-2-plot",
|
||||
"version": "1.1.1",
|
||||
"version": "2.2.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nexrad-level-2-plot",
|
||||
"version": "1.1.1",
|
||||
"version": "2.2.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"canvas": "^2.8.0",
|
||||
"nexrad-level-2-data": "file:../nexrad-level-2-data"
|
||||
"nexrad-level-2-data": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.0.0",
|
||||
@@ -22,33 +22,17 @@
|
||||
"node": ">=13.0.0"
|
||||
}
|
||||
},
|
||||
"../nexrad-level-2-data": {
|
||||
"version": "2.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"seek-bzip": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"glob": "^7.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=13.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz",
|
||||
"integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz",
|
||||
"integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
"debug": "^4.3.2",
|
||||
"espree": "^9.2.0",
|
||||
"espree": "^9.3.1",
|
||||
"globals": "^13.9.0",
|
||||
"ignore": "^4.0.6",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.2.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"minimatch": "^3.0.4",
|
||||
@@ -58,19 +42,10 @@
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc/node_modules/ignore": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
|
||||
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/config-array": {
|
||||
"version": "0.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz",
|
||||
"integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==",
|
||||
"version": "0.9.5",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
|
||||
"integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@humanwhocodes/object-schema": "^1.2.1",
|
||||
@@ -347,6 +322,14 @@
|
||||
"color-support": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
|
||||
"integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@@ -378,9 +361,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
@@ -519,12 +502,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz",
|
||||
"integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
|
||||
"integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint/eslintrc": "^1.0.5",
|
||||
"@eslint/eslintrc": "^1.2.1",
|
||||
"@humanwhocodes/config-array": "^0.9.2",
|
||||
"ajv": "^6.10.0",
|
||||
"chalk": "^4.0.0",
|
||||
@@ -532,10 +515,10 @@
|
||||
"debug": "^4.3.2",
|
||||
"doctrine": "^3.0.0",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^7.1.0",
|
||||
"eslint-scope": "^7.1.1",
|
||||
"eslint-utils": "^3.0.0",
|
||||
"eslint-visitor-keys": "^3.2.0",
|
||||
"espree": "^9.3.0",
|
||||
"eslint-visitor-keys": "^3.3.0",
|
||||
"espree": "^9.3.1",
|
||||
"esquery": "^1.4.0",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
@@ -618,9 +601,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-module-utils": {
|
||||
"version": "2.7.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz",
|
||||
"integrity": "sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==",
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz",
|
||||
"integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^3.2.7",
|
||||
@@ -694,9 +677,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/eslint-scope": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz",
|
||||
"integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
|
||||
"integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esrecurse": "^4.3.0",
|
||||
@@ -734,23 +717,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-visitor-keys": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz",
|
||||
"integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
|
||||
"integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "9.3.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz",
|
||||
"integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==",
|
||||
"version": "9.3.1",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz",
|
||||
"integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.7.0",
|
||||
"acorn-jsx": "^5.3.1",
|
||||
"eslint-visitor-keys": "^3.1.0"
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -968,9 +951,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "13.12.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz",
|
||||
"integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==",
|
||||
"version": "13.13.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
|
||||
"integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"type-fest": "^0.20.2"
|
||||
@@ -1013,9 +996,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -1427,9 +1410,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
@@ -1494,8 +1477,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nexrad-level-2-data": {
|
||||
"resolved": "../nexrad-level-2-data",
|
||||
"link": true
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/nexrad-level-2-data/-/nexrad-level-2-data-2.3.0.tgz",
|
||||
"integrity": "sha512-M5yMdgaNW462f7WiVW4Q2uhpcrE4tWN6VhEtO2jTbHy9+Lmex/HrSntrRvFaU3OuffACs5W9F7xZIiBQhmjxAA==",
|
||||
"dependencies": {
|
||||
"seek-bzip": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=13.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.6.7",
|
||||
@@ -1820,6 +1810,18 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/seek-bzip": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-2.0.0.tgz",
|
||||
"integrity": "sha512-SMguiTnYrhpLdk3PwfzHeotrcwi8bNV4iemL9tx9poR/yeaMYwB9VzR1w7b57DuWpuqR8n6oZboi0hj3AxZxQg==",
|
||||
"dependencies": {
|
||||
"commander": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"seek-bunzip": "bin/seek-bunzip",
|
||||
"seek-table": "bin/seek-bzip-table"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
@@ -1875,9 +1877,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
|
||||
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"node_modules/simple-concat": {
|
||||
"version": "1.0.1",
|
||||
@@ -1899,9 +1901,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/simple-get": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz",
|
||||
"integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",
|
||||
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
|
||||
"dependencies": {
|
||||
"decompress-response": "^4.2.0",
|
||||
"once": "^1.3.1",
|
||||
@@ -2039,9 +2041,9 @@
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"node_modules/tsconfig-paths": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",
|
||||
"integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==",
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
|
||||
"integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json5": "^0.0.29",
|
||||
@@ -2184,34 +2186,26 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@eslint/eslintrc": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz",
|
||||
"integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz",
|
||||
"integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^6.12.4",
|
||||
"debug": "^4.3.2",
|
||||
"espree": "^9.2.0",
|
||||
"espree": "^9.3.1",
|
||||
"globals": "^13.9.0",
|
||||
"ignore": "^4.0.6",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.2.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"strip-json-comments": "^3.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ignore": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
|
||||
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@humanwhocodes/config-array": {
|
||||
"version": "0.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz",
|
||||
"integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==",
|
||||
"version": "0.9.5",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
|
||||
"integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@humanwhocodes/object-schema": "^1.2.1",
|
||||
@@ -2418,6 +2412,11 @@
|
||||
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
|
||||
},
|
||||
"commander": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
|
||||
"integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA=="
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@@ -2446,9 +2445,9 @@
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
@@ -2546,12 +2545,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"eslint": {
|
||||
"version": "8.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz",
|
||||
"integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
|
||||
"integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint/eslintrc": "^1.0.5",
|
||||
"@eslint/eslintrc": "^1.2.1",
|
||||
"@humanwhocodes/config-array": "^0.9.2",
|
||||
"ajv": "^6.10.0",
|
||||
"chalk": "^4.0.0",
|
||||
@@ -2559,10 +2558,10 @@
|
||||
"debug": "^4.3.2",
|
||||
"doctrine": "^3.0.0",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^7.1.0",
|
||||
"eslint-scope": "^7.1.1",
|
||||
"eslint-utils": "^3.0.0",
|
||||
"eslint-visitor-keys": "^3.2.0",
|
||||
"espree": "^9.3.0",
|
||||
"eslint-visitor-keys": "^3.3.0",
|
||||
"espree": "^9.3.1",
|
||||
"esquery": "^1.4.0",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
@@ -2630,9 +2629,9 @@
|
||||
}
|
||||
},
|
||||
"eslint-module-utils": {
|
||||
"version": "2.7.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz",
|
||||
"integrity": "sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==",
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz",
|
||||
"integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^3.2.7",
|
||||
@@ -2698,9 +2697,9 @@
|
||||
}
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz",
|
||||
"integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
|
||||
"integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esrecurse": "^4.3.0",
|
||||
@@ -2725,20 +2724,20 @@
|
||||
}
|
||||
},
|
||||
"eslint-visitor-keys": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz",
|
||||
"integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
|
||||
"integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
|
||||
"dev": true
|
||||
},
|
||||
"espree": {
|
||||
"version": "9.3.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz",
|
||||
"integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==",
|
||||
"version": "9.3.1",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz",
|
||||
"integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^8.7.0",
|
||||
"acorn-jsx": "^5.3.1",
|
||||
"eslint-visitor-keys": "^3.1.0"
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"esquery": {
|
||||
@@ -2908,9 +2907,9 @@
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"version": "13.12.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz",
|
||||
"integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==",
|
||||
"version": "13.13.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
|
||||
"integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"type-fest": "^0.20.2"
|
||||
@@ -2938,9 +2937,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"dev": true
|
||||
},
|
||||
"has-tostringtag": {
|
||||
@@ -3225,9 +3224,9 @@
|
||||
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@@ -3277,12 +3276,10 @@
|
||||
"dev": true
|
||||
},
|
||||
"nexrad-level-2-data": {
|
||||
"version": "file:../nexrad-level-2-data",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/nexrad-level-2-data/-/nexrad-level-2-data-2.3.0.tgz",
|
||||
"integrity": "sha512-M5yMdgaNW462f7WiVW4Q2uhpcrE4tWN6VhEtO2jTbHy9+Lmex/HrSntrRvFaU3OuffACs5W9F7xZIiBQhmjxAA==",
|
||||
"requires": {
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"glob": "^7.1.7",
|
||||
"seek-bzip": "^2.0.0"
|
||||
}
|
||||
},
|
||||
@@ -3500,6 +3497,14 @@
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"seek-bzip": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-2.0.0.tgz",
|
||||
"integrity": "sha512-SMguiTnYrhpLdk3PwfzHeotrcwi8bNV4iemL9tx9poR/yeaMYwB9VzR1w7b57DuWpuqR8n6oZboi0hj3AxZxQg==",
|
||||
"requires": {
|
||||
"commander": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
@@ -3540,9 +3545,9 @@
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
|
||||
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"simple-concat": {
|
||||
"version": "1.0.1",
|
||||
@@ -3550,9 +3555,9 @@
|
||||
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
||||
},
|
||||
"simple-get": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz",
|
||||
"integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",
|
||||
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
|
||||
"requires": {
|
||||
"decompress-response": "^4.2.0",
|
||||
"once": "^1.3.1",
|
||||
@@ -3657,9 +3662,9 @@
|
||||
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
||||
},
|
||||
"tsconfig-paths": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",
|
||||
"integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==",
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
|
||||
"integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json5": "^0.0.29",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nexrad-level-2-plot",
|
||||
"version": "1.1.1",
|
||||
"version": "2.2.0",
|
||||
"description": "Plotting library for nexrad-level-2-data",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"homepage": "https://github.com/netbymatt/nexrad-level-2-plot#readme",
|
||||
"dependencies": {
|
||||
"canvas": "^2.8.0",
|
||||
"nexrad-level-2-data": "file:../nexrad-level-2-data"
|
||||
"nexrad-level-2-data": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.0.0",
|
||||
|
||||
+34
-20
@@ -35,6 +35,14 @@ const palettes = {
|
||||
};
|
||||
/* eslint-enable global-require */
|
||||
|
||||
const preferredWaveformUsage = {
|
||||
1: ['REF', 'SW ', 'ZDR', 'PHI', 'RHO'],
|
||||
2: ['VEL'],
|
||||
3: ['REF', 'VEL', 'SW ', 'ZDR', 'PHI', 'RHO'],
|
||||
4: ['REF', 'VEL', 'SW ', 'ZDR', 'PHI', 'RHO'],
|
||||
5: ['REF', 'VEL', 'SW ', 'ZDR', 'PHI', 'RHO'],
|
||||
};
|
||||
|
||||
// default options
|
||||
const DEFAULT_OPTIONS = {
|
||||
// must be a square image
|
||||
@@ -42,6 +50,7 @@ const DEFAULT_OPTIONS = {
|
||||
cropTo: 3600,
|
||||
background: 'black',
|
||||
lineWidth: 2,
|
||||
usePreferredWaveforms: true,
|
||||
};
|
||||
|
||||
const draw = (data, _options) => {
|
||||
@@ -51,6 +60,14 @@ const draw = (data, _options) => {
|
||||
..._options,
|
||||
};
|
||||
|
||||
// check preferred waveforms
|
||||
const elevationInfo = data?.vcp?.record?.elevations?.[options?.elevation];
|
||||
// elevation info is not available in chunks mode, so preferred waveforms cannot be processed
|
||||
if (elevationInfo) {
|
||||
const preferredProducts = preferredWaveformUsage[elevationInfo.waveform_type];
|
||||
if (options.usePreferredWaveforms && !preferredProducts.includes(options.product)) return false;
|
||||
}
|
||||
|
||||
// calculate scale
|
||||
if (options.size > DEFAULT_OPTIONS.size) throw new Error(`Upsampling is not supported. Provide a size <= ${DEFAULT_OPTIONS.size}`);
|
||||
if (options.size < 1) throw new Error('Provide options.size > 0');
|
||||
@@ -60,6 +77,20 @@ const draw = (data, _options) => {
|
||||
const cropTo = Math.min(options.size, options.cropTo);
|
||||
if (options.cropTo < 1) throw new Error('Provide options.cropTo > 0');
|
||||
|
||||
// create the canvas and context
|
||||
const canvas = createCanvas(cropTo, cropTo);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// fill background with black
|
||||
ctx.fillStyle = options.background;
|
||||
ctx.fillRect(0, 0, cropTo, cropTo);
|
||||
|
||||
// canvas settings
|
||||
ctx.imageSmoothingEnabled = true;
|
||||
ctx.lineWidth = options.lineWidth;
|
||||
ctx.translate(cropTo / 2, cropTo / 2);
|
||||
ctx.rotate(-Math.PI / 2);
|
||||
|
||||
// get the palette
|
||||
const palette = palettes[options.product];
|
||||
// test for valid palette
|
||||
@@ -93,27 +124,10 @@ const draw = (data, _options) => {
|
||||
const indexedProduct = indexProduct(downSampledProduct, palette);
|
||||
const rrlEncoded = rrle(indexedProduct, resolution);
|
||||
|
||||
// create the canvas and context
|
||||
const canvas = createCanvas(cropTo, cropTo);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// fill background with black
|
||||
ctx.fillStyle = options.background;
|
||||
ctx.fillRect(0, 0, cropTo, cropTo);
|
||||
|
||||
// calculate a gate size against the nominal size
|
||||
const gateScale = rrlEncoded[0].gate_size / 0.25;
|
||||
|
||||
// canvas settings
|
||||
ctx.imageSmoothingEnabled = true;
|
||||
ctx.lineWidth = options.lineWidth * gateScale;
|
||||
ctx.translate(cropTo / 2, cropTo / 2);
|
||||
ctx.rotate(-Math.PI / 2);
|
||||
|
||||
// loop through data
|
||||
rrlEncoded.forEach((radial) => {
|
||||
// calculate plotting parameters
|
||||
const deadZone = radial.first_gate / radial.gate_size / scale * gateScale;
|
||||
const deadZone = radial.first_gate / radial.gate_size / scale;
|
||||
|
||||
// 10% is added to the arc to ensure that each arc bleeds into the next just slightly to avoid radial empty spaces at further distances
|
||||
const startAngle = radial.azimuth * (Math.PI / 180) - halfResolution * 1.1;
|
||||
@@ -127,11 +141,11 @@ const draw = (data, _options) => {
|
||||
if (bin.count) {
|
||||
// rrle encoded
|
||||
ctx.strokeStyle = palette.lookupRgba[bin.value];
|
||||
ctx.arc(0, 0, (idx + deadZone) * gateScale, startAngle, endAngle + resolution * (bin.count - 1));
|
||||
ctx.arc(0, 0, (idx + deadZone), startAngle, endAngle + resolution * (bin.count - 1));
|
||||
} else {
|
||||
// plain data
|
||||
ctx.strokeStyle = palette.lookupRgba[bin];
|
||||
ctx.arc(0, 0, (idx + deadZone) * gateScale, startAngle, endAngle);
|
||||
ctx.arc(0, 0, (idx + deadZone), startAngle, endAngle);
|
||||
}
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
@@ -5,27 +5,7 @@
|
||||
|
||||
const filterProduct = (data, product) => data.map((header) => {
|
||||
// get correct data
|
||||
let thisRadial = header[product];
|
||||
|
||||
// special case for non-hi-res data
|
||||
// re-formats data to expected format
|
||||
if (!thisRadial.moment_data && thisRadial) {
|
||||
thisRadial = {
|
||||
...header,
|
||||
moment_data: header[product],
|
||||
};
|
||||
|
||||
if (product === 'refelect') {
|
||||
thisRadial.gate_size = header.surveillance_range_sample_interval;
|
||||
thisRadial.gate_count = header.number_of_surveillance_bins;
|
||||
} else {
|
||||
thisRadial.gate_size = header.doppler_range_sample_interval;
|
||||
thisRadial.gate_count = header.number_of_doppler_bins;
|
||||
}
|
||||
|
||||
thisRadial.first_gate = 2;
|
||||
}
|
||||
|
||||
const thisRadial = header[product];
|
||||
// skip if this radial isn't found
|
||||
if (thisRadial === undefined) return false;
|
||||
thisRadial.azimuth = header.azimuth;
|
||||
|
||||
+21
-8
@@ -10,11 +10,13 @@ const { writePngToFile } = require('./utils/file');
|
||||
* @param {string} [options.background=#000000] Background color of the image. This can be transparent by using #RGBA notation.
|
||||
* @param {number} [options.lineWidth=2] The raster image is created by drawing several arcs at the locations and colors specified in the data file. When scaling down you may get a better looking image by adjusting this value to something large than the default.
|
||||
* @param {(boolean|object)} [options.palettize] After drawing the image convert the image from RGBA to a palettized image. When true the same palette as the product is used.
|
||||
* @param {(undefined|number|number[])} [options.elevations=undefined] List of elevations to plot.
|
||||
* @param {boolean} [options.usePreferredWaveforms = true] Limit the plotted data to the preferred use of waveforms 1 and 2.
|
||||
* @returns Canvas
|
||||
*/
|
||||
const plot = (data, _products, options) => {
|
||||
// store result
|
||||
const result = {};
|
||||
const result = [];
|
||||
|
||||
let products;
|
||||
// make product list into an array
|
||||
@@ -28,16 +30,27 @@ const plot = (data, _products, options) => {
|
||||
}
|
||||
|
||||
// get the available elevations
|
||||
const elevations = data.listElevations();
|
||||
if (elevations.length === 0) throw new Error('No elevations availabe');
|
||||
const availableElevations = data.listElevations();
|
||||
if (availableElevations.length === 0) throw new Error('No elevations availabe');
|
||||
|
||||
products.forEach((product) => {
|
||||
// parse and store result
|
||||
result[product] = draw(data, {
|
||||
...options,
|
||||
product,
|
||||
// handle options.elevations defaults
|
||||
let elevations = options?.elevations;
|
||||
if (!elevations) elevations = availableElevations;
|
||||
if (typeof elevations === 'number') elevations = [elevations];
|
||||
|
||||
elevations.forEach((elevation) => {
|
||||
const elevationResult = { elevation };
|
||||
products.forEach((product) => {
|
||||
// parse and store result
|
||||
elevationResult[product] = draw(data, {
|
||||
...options,
|
||||
elevation,
|
||||
product,
|
||||
});
|
||||
});
|
||||
result.push(elevationResult);
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user