Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
airspace-calculator
Advanced tools
Module that uses ArcGIS image service and USGS elevation service to determine if a structure can be erected at a given height. Also provides UI controls.
A module that will calculate surface penetration using the USGS NED Point Query Service and an ArcGIS Image service.
You can see the library in action with this single-page application (SPA) web map. This application is built with the ArcGIS API for JavaScript (the older version, 3.X).
You will need an image service in order to use this library. Instructions for setting up an image service can be found here.
The airspace calculator is hosted on NPM and can be installed as follows:
$ npm install -S airspace-calculator
Below is an example written in TypeScript which shows how to perform a calculation.
import AirspaceCalculator from "airspace-calculator";
const ac = new AirspaceCalculator("https://example.com/arcgis/rest/services/AirportMapApplication/AirspaceCalculatorSurface/ImageServer");
const x = -122.9033660888309;
const y = 46.972736571798244;
const agl = 100;
try {
const acResult = await ac.calculate(x, y, agl);
const [outX, outY] = acResult.xy;
const msg = `An elevation of ${acResult.agl} will penetrate the surface at ${acResult.surfacePenetration}. Coords: [${outX}, ${outY}]`;
} catch (error) {
console.error(error);
}
Installing dependencies. After the dependencies are installed, the prepare step will run.
$ npm install
Build
$ npm run prepare
Unit tests are written using Jasmine. You can run the unit tests with the following command.
$ npm test
FAQs
Module that uses ArcGIS image service and USGS elevation service to determine if a structure can be erected at a given height. Also provides UI controls.
We found that airspace-calculator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.