When I calculate the aspect with richdem within Python:
import richdem as rd
aspect = rd.TerrainAttribute(rd.LoadGDAL($DEM_TIF), attrib = 'aspect')
I have to flip the array vertically (with numpy.flipud(aspect)) to store the aspect as netCDF and have the same results as with gdaldem.
Could you help me to identify what might be the reason. I want to calculate the aspect with richdem, because for some DEMs I get NaNs for some pixels with gdaldem.
Until now, I calculated the aspect of a digital elevation model with the following command:
When I calculate the aspect with richdem within Python:
I have to flip the array vertically (with numpy.flipud(aspect)) to store the aspect as netCDF and have the same results as with gdaldem. Could you help me to identify what might be the reason. I want to calculate the aspect with richdem, because for some DEMs I get NaNs for some pixels with gdaldem.