SRTM Elevation Data in PHP

This page is a demo of my PHP code to read elevation data from the freely-available 5°x5° SRTM v4.1 GeoTIFF data files which provide worldwide elevations at roughly 90m intervals. The code - along with demo usage and links to download the data - is available on Github at https://github.com/bobosola/PHP-SRTM.

So why bother rolling your own code? Elevation data is already available from a number of online sources, but most (if not all) restrict the number of data requests you can make. So to get the flexibility and speed to do whatever you like with the data as often as you like, you will need to read the raw data files yourself. I expect the main use for the code will be to generate elevation data or profile charts for hiking or cycling.

Demo

Click or tap any two points on the map to generate an elevation profile image under the map If you try it over large distances the graph may take a few seconds to load. This delay is caused by the graph software (JpGraph) not the PHP code, which returns thousands of elevations in milliseconds.

Latitude Longitude Elevation
Location 1
Location 2
chart