I am new to GDAL and am looking for pointers about the Correct™ way to accomplish a few tasks. I would like to do this in Python, not on the command line.
I have a GeoTIFF that shows elevation at 10m intervals over a given area. That is, every pixel is a 10m x 10m area. The GeoTIFF contains a single raster image, where elevation in meters is expressed as a Float32. The GeoTIFF seems to have tags defining the geoid/datum (which UTM zone etc).
I wish to open that image, and query what the elevation is at a certain point, such as in the following pseudocode:
elevation = myGeoTiffData.getValueAtPosition(Position('WGS84', 39.584588, -122.461320))
Further, I would like to have this elevation interpolated (linearly, spline-wise, however else) if the requested position does not fall on a 10m x 10m lattice point. I see there are some functions to do this (GDAL grid?), but I do not understand how to use them in this case.
I have tried to read the GDAL documentation, but I can't seem to figure this out. Is there any advice people here can offer?