reyemtm / elevationQuery

A tool that queries publicly available elevations for a given set of points and returns the result as an array and GeoJSON.

Home Page:https://observablehq.com/@reyemtm/query-elevations-using-usgs-and-gmrt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elevation Query

import elQ from "elevation-query";
import fs from "fs";
const { getElevation, getPointArray } = elQ;

const line = JSON.parse(fs.readFileSync("./docs/trail.geojson"));
const points = getPointArray(line, {max: 5});

(async () => {
  //Providers are USGS and GMRT (default)
  const { elevationArray, featureCollection } = await getElevation(points, {provider: ""});
  console.log(points);
  console.log(elevationArray)
})()

About

A tool that queries publicly available elevations for a given set of points and returns the result as an array and GeoJSON.

https://observablehq.com/@reyemtm/query-elevations-using-usgs-and-gmrt

License:MIT License


Languages

Language:JavaScript 100.0%