I am correcting and cropping GeoTIFF DEM data using GDAL 2.4.0 to obtain the image raster. After doing my manipulations, I have the raster I want (checked by plotting with plt.imshow()), but while exporting/saving to a GeoTIFF the last hundred or so rows are cut off. Here is the exporting section of my script, let me know if you have any ideas as to why this is happening.
# Export and Save print("Exporting file...") crop_tiff = driver.Create(filename, ds_array.shape, ds_array.shape, 1, gdal.GDT_Float32) #Create new GeoTiff crop_tiff.GetRasterBand(1).WriteArray(ds_array) #Write data crop_tiff.GetRasterBand(1).SetNoDataValue((noData)) crop_tiff.SetGeoTransform(new_gt) crop_tiff.SetProjection(proj) crop_tiff.FlushCache() #Flush and save. print("Saving complete.")