I have satellite image that I want to convert into numpy array (and then to Pandas). I already know how to do that, but the problem is that it does not preserve the coordinate data.
This is how I do it now:
import xarray
src=rasterio.open('14072020.tif')
array = src.read()
pd.DataFrame(array.reshape([13,-1]).T)
I have also tried to follow this answer (keeping the coordinate system of raster files in the resulting raster file after operation with numpy) but I always get this error:
NameError: name 'gdal_array' is not defined
which does not allow me to open the image.
My end goal is to have Pandas table that contains the bands values together with the coordinate values.