c# Get Altitude at position
-
27-05-2021 - |
Question
I need to get the altitude of a latitude and longitude position (ground altitude).
I haven't found anything able to do this.
Any ideas?
Thanks!
Solution
you can use Shuttle Radar Topography Mission (SRTM) data files, which may be obtained through this URL: https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/
for c# Examples see : https://github.com/itinero/srtm and : https://github.com/alpinechough/Alpinechough.Srtm
and docs : https://dds.cr.usgs.gov/srtm/version2_1/Documentation/
OTHER TIPS
The USGS (US Geological Survey) has an API for this as well that includes a WSDL. http://cumulus.cr.usgs.gov/service_description_elevation.php
Use BING MAP SDK with spatial services (REST) More info here
I would use the Google Elevation API. From C#, use a WebClient
to request URLs such as: http://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034|36.455556,-116.866667&sensor=true
Or download the .Net library.
Check out the The Google Elevation API