News for hackers. Stuff that matters.
Re:Nearly Every USGS Topo Map For Free by cryptoz on Wednesday October 15, 2014 @06:00PM (#8462077)
A killer feature using this dataset would be an API to get ground-level elevation (above sea level) by passing a latitude and longitude pair. This exists in about 10 different APIs across the web already, but they're wildly expensive (or low-res). Google's is wrapped inside Maps for Business, which IIRC would cost far more than most startups can afford.

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?

Re:Nearly Every USGS Topo Map For Free by danpat on Wednesday October 15, 2014 @08:16PM (#8462599)
You can already do this fairly easily;

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;

Re:Nearly Every USGS Topo Map For Free by cullenking on Thursday October 16, 2014 @12:19PM (#8465716)
See my above comment for a library that requires no geospatial database, just DEM files in gridfloat format. By recording information about each gridfloat file (bounding box, cellsize in lat/lng) you can do some simple math and only one disk operation (in the optimal case) to get an elevation value. Even with my crappy code in the library I mentioned in the other comment, the service is very fast on even spinning disks.
Re:Nearly Every USGS Topo Map For Free by kersny on Wednesday October 15, 2014 @07:02PM (#8462342)
This[1] post was on HN about a year ago pointing to the Data Science Toolkit[2] for getting elevation and performing other geographic data lookups.

[1]: http://petewarden.com/2013/09/09/why-you-should-stop-piratin... [2]: http://www.datasciencetoolkit.org/

Re:Nearly Every USGS Topo Map For Free by cullenking on Thursday October 16, 2014 @10:23AM (#8464996)
If you are interested in a service that does this, I host a redundant elevation service using NED, SRTM and ASTER data. It tries NED (highest res) first, falls back to SRTM and then finally to ASTER. ASTER is pretty bad in some areas, but it's the only dataset available above 60 degrees north/south.

We use it for our route planner on http://ridewithgps.com

Feel free to email me, [email protected] 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:

https://github.com/kingcu/geotiff2gridfloat

Re:Nearly Every USGS Topo Map For Free by colanderman on Thursday October 16, 2014 @10:56AM (#8465223)
I'd also like to see a tile server that serves up (raw) elevation data rather than imagery. The tricky part is that elevation data has a sufficiently large dynamic range that you can't use most common image formats; but even with a custom tile format this would be useful for e.g. stereoscopic display.

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.

Re:Nearly Every USGS Topo Map For Free by japhyr on Wednesday October 15, 2014 @07:01PM (#8462337)
How do you get this data from the USGS? Is this what you're referring to?

http://ned.usgs.gov/epqs/