Get altitude by longitude and latitude in Android
My approach is to use USGS Elevation Query Web Service: private double getAltitude(Double longitude, Double latitude) { double result = Double.NaN; HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); String url = “http://gisdata.usgs.gov/” + “xmlwebservices2/elevation_service.asmx/” + “getElevation?X_Value=” + String.valueOf(longitude) + “&Y_Value=” + String.valueOf(latitude) + “&Elevation_Units=METERS&Source_Layer=-1&Elevation_Only=true”; HttpGet httpGet = new HttpGet(url); try { HttpResponse … Read more