1.0.3 • Published 5 years ago

nws-ridge v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

nws-ridge-node

Access National Weather Service RIDGE radar images with Node.JS

Install

npm i nws-ridge

Example

const RIDGEImage    = require('nws-ridge');

// Get the base reflectivity image from the Duluth, MN radar
let duluthN0R = new RIDGEImage('DLH');

console.log(`DLH_N0R url ${duluthN0R.URL}`);

// Get image size
duluthN0R.getSize().then((size) => {
    console.log(`N0R image is ${size.width}x${size.height}`);
});

// Get the storm relative velocity image from the Duluth, MN radar
let duluthN0S = new RIDGEImage('DLH', 'N0S');

// Get the coordinates of the RIDGE image
duluthN0S.getMinCoord().then((coords) => {
    console.log(`N0S image starts at ${coords.latitude}, ${coords.longitude}`);
});