Is it possible to get the elevation (approximate is fine) of a specific latitude & longitude through the REST API?
Solved! Go to Solution.
You might consider other options. EPQS (nationalmap.gov) comes to mind. If you are working with Image Services, then you might be able to use one of those endpoints. I think Identify and Get Samples could work for this use case.
@bmccoy I believe this is possible, the REST API doc states:
Reference: Elevation analysis service
Thank you for the reply @AyanPalit , but this is not what we need for our application. I believe the the profile feature would allow us to submit a job and it would return us an analysis along a line. We just simply need to get the elevation of a specific lat/lon within the US. So as the user clicks a point on a map, we would be able to retrieve the elevation of that specific map point and display it.
To clarify, I found this endpoint...https://elevation.arcgis.com/arcgis/rest/services/WorldElevation/TopoBathy/ImageServer/identify?geom...
But that returns...
{ "objectId": 0, "name": "Pixel", "value": "-2317", "location": { "x": -99.447299999999998, "y": 41.2057, "spatialReference": { "wkid": 102100, "latestWkid": 3857 } }, "properties": null, "catalogItems": null, "catalogItemVisibilities": [ ] }
I believe this is close to what we need, but the value returned is obviously not correct.
You might consider other options. EPQS (nationalmap.gov) comes to mind. If you are working with Image Services, then you might be able to use one of those endpoints. I think Identify and Get Samples could work for this use case.
Thank you Earl. I happened to find that endpoint with the nationalmap.gov site that you mentioned yesterday after some searching. They have exactly what we need for our use case. Thank you.
not for nothing since this post was from September but the call you are making on esri's elevation service is returning the depth/elev value in Web Mercator (the uom is meters not degrees) out in the polar regions along the Greenwich line.
Try this...
{ "objectId": 0, "name": "Pixel", "value": "730.826", "location": { "x": -1.107384508E7, "y": 5054889.08, "spatialReference": { "wkid": 102100, "latestWkid": 3857 } }, "properties": null, "catalogItems": null, "catalogItemVisibilities": [] }
@SHMAGIC This is a great solution thank you. My question is if you are doing this in vanilla Python, I'm curious how this works since you need a token. I can generate an API key, but elevation is not technically in the "location services" available to your API tokens. So is it possible to generate an token for API requests based on an API token without specifying your username and password (we log in via SAML)