Mike Vasi
Mike Vasi

Reputation: 477

How to find the elevation of a lon/lat polygon

I am trying to create an application that uses terrain information about an area. I use lon/lat (4326) polygons from a kml file and store the geometries in postgis.

I need to find the elevation fluctuations of a particular area (polygon) defined by lon/lat points. How is this possible? I have read certain possible solutions like DEM but i do not how to use them. Is there any other way of achieving it?

Thanks in advance for your replies.

Upvotes: 2

Views: 1987

Answers (1)

gaborsch
gaborsch

Reputation: 15758

Surprisingly there is a Google Elevation API :) (mainly for Android development, you need to register for a proper key):

https://developers.google.com/maps/documentation/elevation/

Maybe you could use the JavaScript API of the same service (I haven't tried this one, just found the link from the previous one):

https://developers.google.com/maps/documentation/javascript/services#Elevation

Probably you can us it, but beware of this:

Use of the Google Elevation API is subject to a limit of 2,500 requests per day.

The good thing is that in one request you can get elevation data about a Line, with arbitrary number of divider points (the dividers are sectioning the line into equal length sections).

Upvotes: 1

Related Questions