Re:Why you should not pirate Google’s geo APIs
by Doctor_Fegg on Tuesday September 10, 2013 @11:54AM
(#6360794)
Worrying about TIN is the 10% case. Simple interpolation within SRTM raster tiles is all that's needed for 90% of cases (IMHO, obviously).
[ Parent
| on HN ]
Re:Why you should not pirate Google’s geo APIs
by hackula1 on Tuesday September 10, 2013 @12:24PM
(#6361053)
I would not think interpolation would be that much easier than a creating a TIN. I have not looked at the dataset though, so it might be "pre-interpolated" (probably using a TIN if I had to guess), in which case this would be pretty easy with something like pyqgis on a flask server or whatever. The entire api could basically just be:
@app.route("/elevation")
def elevation():
fileName = "/path/to/raster/srtmRaster.tif"
fileInfo = QFileInfo(fileName)
baseName = fileInfo.baseName()
srtmRaster = QgsRasterLayer(fileName, baseName)
res, ident = srtmRaster.identify(QgsPoint(request.form['lat'], request.form['lon']))
return ident[0]
I can test this out and throw it on github with some polish if anyone is interested.