3

The Google Maps Elevation API lets me pass a URL like

https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.984703

along with a developer key, and get a result like

{
   "results" : [
      {
         "elevation" : 1608.637939453125,
         "location" : {
            "lat" : 39.73915360,
            "lng" : -104.98470340
         },
         "resolution" : 4.771975994110107
      }
   ],
   "status" : "OK"
}

My company want to use something like this, but don't have the time for their legal department to go through the license.

Is there something similar with an MIT, Apache, GPL2, or similar license?

Basically, we want to input lat/long and get back elevation.

  • 1
    Does openstreetmap.org do this? If not, you can download DEM files from usgs.gov but that would require setting up your own db/queries. – barrycarter Sep 27 '16 at 15:06
  • I am new to this, Do you have a URL for those DEMs? – Mawg Sep 27 '16 at 16:14
  • 1
    Start with usgs.gov/products/maps/gis-data but poke around. I know I've found the data I wanted previously, but that was ages ago and they've redesigned the site. Feel free to contact me directly if you'd like. – barrycarter Sep 27 '16 at 16:33
  • Alas, I could only find data for the USA :-( – Mawg Sep 27 '16 at 16:38
  • 1
    earthexplorer.usgs.gov but I agree they do a good job of hiding it. Googling "world dem maps site:.gov" (no quotes) provides other helpful resources. Not sure who downvoted it, but I upvoted to counteract. Is there a "where to find data?" wiki entry somewhere? – barrycarter Oct 7 '16 at 15:13
2

There is the Open-Elevation API (https://open-elevation.com/) that looks promising

see https://github.com/Jorl17/open-elevation/blob/master/docs/api.md for API examples

Live API sample: https://api.open-elevation.com/api/v1/lookup?locations=41.161758,-8.583933

  • Looks great! I notice, though, that it doesn't tell you what area it covers. Do you know? E.g USA only/whole planet? – Mawg Jun 10 at 11:52
  • Aha! From the documentation about hosting your own ... "Open-Elevation doesn't come with any data of its own, but it offers a set of scripts to get the whole SRTM 250m dataset" – Mawg Jun 10 at 11:54
  • 1
    actually they seem to have performance issues with their hosted API (see comments at github.com/Jorl17/open-elevation/issues/11 and a fiddle to try it out there via Javascript/AJAX), however you could host it on your own private server (probably combined with CORS so that other pages on non-modified web browsers don't hit it) – George Birbilis Jun 10 at 14:48
  • 1
    so I'm currently trying elevation-api.io and it looks quite fast – George Birbilis Jun 10 at 14:49
  • 1
    btw, can also try the CURL sample of Open-Elevation API online at onlinecurl.com – George Birbilis Jun 10 at 15:08
3

You could try https://elevation-api.io

Disclaimer: I am the developer of the site, but also needed an alternative.

Edit: According to an admin, I'm to include a "long" answer with "context". So here it goes:

ahem... This is an API which returns elevation data, just as Google does, maybe you'll find it as a suitable replacement.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 1
    A nice api, but alas, no ocean depth data, from what I can tell (all elevations come back at 0m for locations at sea). – OrangeWombat Jan 29 at 2:21
  • 1
    Yes, unfortunately I haven't included ocean depth data yet, but it is on the todo list. :-) – Miles Jan 29 at 6:59
  • 1
    at your site it says "JSON in POST requests should be in the following format: {"points": [(12.3,45.6),(12.4,23.4)]}", but I found out JSON in POST requests should be in the following format: {"points": [[12.3,45.6],[12.4,23.4]]} was needed (else it kept on returning error that instead of a tuple I was passing a float 12.3) – George Birbilis Jun 10 at 14:57
  • 1
    Ah, thanks @GeorgeBirbilis, I'll have that fixed soon! – Miles Jun 10 at 17:37
  • 1
    @Mawg It's still free, albeit only the 5km resolution. I'm not sure how/why anyone could make use of that, but ~6million requests per day are in the free tier. – Miles Jun 11 at 17:25
1

For those continuing to search (I was and landed here). There is a free USGS service which is well buried. Link here. Worked for my use case of a couple of dozen points. HT to @barrycarter for the index link.

  • 1
    "The 1/3 arc-second dataset covers nearly all the U.S. states and territories, though Alaska has only partial coverage" ... so ... it doesn't cover most of the world? Perhaps of use to some but alas, not to me :-( – Mawg Jun 10 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.