I was wondering if anyone has some experience in getting elevation data from a raster without using ArcGIS, but rather get the information as a python list
or dict
?
I get my XY data as a list of tuples:
xy34 =[perp_obj[j].CalcPnts(float(i.dist), orientation) for j in range (len(perp_obj))]
I'd like to loop through the list or pass it to a function or class-method to get the corresponding elevation for the xy-pairs.
I did some research on the topic and the gdal API sounds promising. Can anyone advice me how to go about things, pitfalls, sample code?
GDAL is not an option as I can't edit the system path variable on the machine I'm working on!
Does anyone know about a different approach?
Best Answer
Here's a more programmatic way of using GDAL than @Aragon's answer. I've not tested it, but it is mostly boiler-plate code that has worked for me in the past. It relies on Numpy and GDAL bindings, but that's about it.