I want to get an XYZ-like surface from a Geotiff with GDAL in Python.
I do the following:
1) Get some geotiff from here: http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp
2) Write the script:
from osgeo import ogr, osr, gdal
file_path = os.path.join(os.path.dirname("/home/felix/dump/srtm_62_05.tif")
gdal_data = gdal.Open(file_path, gdal.GA_ReadOnly)
raster_band = gdal_data.GetRasterBand(1)
raster = raster_band.ReadAsArray()
Okay, it works and even gives me some data in [latitude, longitude --> some_strange_elevation_units]
format.
I want to convert this raster to some X[i,j], Y[i,j], Z[i, j]
surface. And I need the units to be scaled in meters. How can it be done?
P.S. I use GDAL 2.1.3