Currently, I'm developing a plug-in with Python for QGIS, which allows me to perform Line-Of-Sight Calculations. For the calculations, I'm using a python-script which calls modules like "r.viewshed" from GRASS to create the viewshed-maps.
R.viewshed requires some raster-file as input, and that's why I'm using a method called "r.in.gdal" in my python-script to rasterize the elevation-map (tiff.file). The Line-Of-Sight Calculations are working properly, but there's just one problem:
r.viewshed requires one parameter called "observer_elevation". As for now, I've "hardcoded" this parameter since I don't know the elevation (height) of the given coordinate.
Does someone know, how to retrieve the elevation from a given coordinate so that I can process it in my python-script?