Socket
Socket
Sign inDemoInstall

usgs-ned

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    usgs-ned

A client library for the USGS NED Point Query Service.


Version published
Weekly downloads
8
increased by166.67%
Maintainers
1
Install size
11.4 kB
Created
Weekly downloads
 

Readme

Source

usgs-ned

Node.js CI GitHub npm npm GitHub

Library for use with the The National Map - Elevation Point Query Service of the USGS (formerly known as NED).

The Elevation Point Query Service returns the elevation in international feet or meters for a specific latitude/longitude (NAD 1983) point from the USGS Elevation Service hosted at the NGTOC. Input parameters: x (longitude), y (latitude), units (Feet, Meters), output (XML, JSON). Latitude and longitude must be specified in decimal degrees with southern latitudes and western longitudes represented as negative values.

Installation

Use a package manager (e.g., NPM or Yarn) to install the package named usgs-ned.

npm install usgs-ned

Use

import { getElevationData, MeasurementUnits, WKId } from "usgs-ned";

// Call the webs service.

const elevationData = await getElevationData({
  x: -122.57539940320193,
  y: 47.258260494342196,
  units: MeasurementUnits.Feet,
  wkid: WKId.gps,
  includeDate: true,
});

// The expected result should be similar to this.

const expectedResult = {
  location: {
    x: -122.57539940320193,
    y: 47.258260494342196,
    spatialReference: {
      wkid: 4326,
      latestWkid: 4326,
    },
  },
  locationId: 0,
  value: 13.34829010234212,
  rasterId: 42167,
  resolution: 1,
  attributes: {
    AcquisitionDate: new Date(2020, 2, 1)
  },
};

Keywords

FAQs

Last updated on 13 Mar 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc