title: How to obtain the accurate elevation (altitude) value using C#?
body: <p>The question is - how to get elevation by point coordinates with sufficient accuracy?</p>
  
  <p>Now I am using Google Maps Elevation API:</p>
  
  <pre><code>         string LatLngURL = "http://maps.googleapis.com/maps/api/elevation/xml?locations=" 
                  + LatTmp.ToString(CultureInfo.GetCultureInfo("en-US"))
                      + "," + LngTmp.ToString(CultureInfo.GetCultureInfo("en-US"));
                  AltNow.Text = LatLngURL; 
                  XmlDocument altitudegoogle = new XmlDocument();
                  altitudegoogle.Load(LatLngURL);
                  XmlElement root = altitudegoogle.DocumentElement;
                  XmlNode Alt = root.SelectSingleNode("/ElevationResponse/result/elevation");
                  string Altitude = Alt.ChildNodes[0].InnerText;
  </code></pre>
  
  <p>But the thing is:</p>
  
  <ol>
  <li>That code quite slow </li>
  <li>The result is not accurate enough</li>
  </ol>
  
  <p>Also I know that there's <a href="https://geographiclib.sourceforge.io/" rel="nofollow noreferrer">GeographicLib</a> which enables to get a <a href="https://geographiclib.sourceforge.io/html/geoid.html" rel="nofollow noreferrer">geoid height</a>. But geoid height is just a difference between ellipsoid and geoid height not its absolute value.</p>
  
  <p>So, there's two questions:</p>
  
  <ol>
  <li><p>What is the fastest and more accurate way to get altitude of the
  point on the map by its coordinates? (If Google Elevation API is, so
  how to improve my code?) </p></li>
  <li><p>Is it possible to get it using GeographicLib? Maybe I can not understand because English is not my native and everything is clear in its documentation.</p></li>
  </ol>