I'm working with some DEM data I've downloaded from the USGS and am trying to calculate the slope, aspect, and hillshade data of the TIFF file downloaded. Here is the code I'm using:
slope_cmd = "gdaldem slope clipped_by_coords.tif slope_clipped_1.tif"
os.system(slope_cmd)
slope = gdal.Open('slope_clipped_1.tif')
slopeArray = slope.GetRasterBand(1).ReadAsArray()
But when I open the slopeArray array, it is filled with values of -9999. I know the clipped_by_coords.tif file is correct as I opened it in QGIS, so I'm not sure what is happening in between that is causing this issue. Any suggestions would be greatly appreciated!
EDIT
here's the test data I'm working with: https://drive.google.com/file/d/1O4MQhN8Qz8dQsMvDH7HZ_ZQ7K6B75IDn/view?usp=drive_link




It's a little better but not great still
– code_newbie Aug 17 '23 at 19:02