Of course, we can get the data "for free" from the USGS. But then we'd have to host and query the data ourselves, which becomes...expensive. I wonder if there's an inexpensive solution out there, for high-res elevation APIs?
Of course, we can get the data "for free" from the USGS. But then we'd have to host and query the data ourselves, which becomes...expensive. I wonder if there's an inexpensive solution out there, for high-res elevation APIs?
1) Download the SRTM elevation datasource for the region you're interested:
http://e4ftl01.cr.usgs.gov/SRTM/SRTMUS1.003/2000.02.11/
2) Load the .HGT files into PostGIS using raster2pgsql:
http://postgis.net/docs/using_raster_dataman.html#RT_Raster_...
3) Run your queries, relatively simple:
SELECT ST_Value(elevationraster, Point(51.123,-91.123)) FROM elevation_data;
[1]: http://petewarden.com/2013/09/09/why-you-should-stop-piratin... [2]: http://www.datasciencetoolkit.org/
We use it for our route planner on http://ridewithgps.com
Feel free to email me, cullen@ridewithgps.com if you want to use it, or just have questions about getting something together yourself.
Edited to add: code is open source, you just need an afternoon to tweak it (it's a ruby lib and a sinatra app) to work, along with some SRTM gridfloat dems. Code is here:
https://github.com/ridewithgps/humps
And if you need to convert from geotiff to gridfloat, here's some bad C:
I've been considering hosting one myself (based on USGS data), but only if it seems like there are other people who are interested in such a service.