Get surface elevation data and bathymetry data (STRM 30-meters/USGS 3DEP 1/3 arc-second) from a GeoJSON LineString.
JavaScript
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)
})()
``