0

I want to find altitude based on given latitude and longitude value. Is there a math to calculating this? Can you help if there is any formula?

For example:

When I enter latitude and longitude values for any place in Brooklyn

40.67828, -73.94594

I want to calculate the altitude of this place:

Altitude: 19 m

dede
  • 47
  • 4
  • Does this answer your question? [Getting altitude from latitude and longitude (HERE-API)](https://stackoverflow.com/questions/31839199/getting-altitude-from-latitude-and-longitude-here-api) – XaC Dec 19 '22 at 14:07
  • I know Google API. I just wanted to learn the math behind. Thanks – dede Dec 19 '22 at 14:47
  • 1
    @dede i am not an expert, but i'm pretty sure you cannot determine the altitude from the latitude and longitude alone because the latitude and longitude don't tell you anything about the vertical distance. So there is no mathematical formula – you have to utilize a database of some kind in order to map the latitude and longitude to an altitude – Derek O Dec 19 '22 at 18:30
  • 1
    @DerekO indeed, very valid point, and even with a database the data is subjective. Altitude of ground? Highest building? Valid at which date (yes, altitude changes over time)? – mozway Dec 19 '22 at 19:52

1 Answers1

0

Do you have access to Google Elevation API (or to any map api)? This is the only way to calculate the altitude given the coordinates, otherwise it is not possible to calculate it through a formula.

Also, you can find many similar questions as: Getting altitude from latitude and longitude (HERE-API)

FrancecoMartino
  • 409
  • 2
  • 5