Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

airspace-calculator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airspace-calculator

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.

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Airspace Calculator

Build Status bitHound Score

A module that will calculate surface penetration using the USGS NED Point Query Service and an ArcGIS Image service.

Demo

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).

Setup

Image Service

You will need an image service in order to use this library. Instructions for setting up an image service can be found here.

Installing the library via NPM

The airspace calculator is hosted on NPM and can be installed as follows:

$ npm install -S airspace-calculator

Use

Below is an example written in TypeScript which shows how to perform a calculation.

const ac = new AirspaceCalculator("http://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);
}

For maintainers

Installing dependencies. After the dependencies are installed, the prepare step will run.

$ npm install

Build

$ npm run prepare

Testing

Unit tests are written using Jasmine. You can run the unit tests with the following command.

$ npm test

Keywords

FAQs

Package last updated on 11 Jan 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc