I am trying to use the pysheds package to calculate flow accumulation from a DEM. However, when reading the DEM .tif-file, I get the following error. I can't find any more information as to what this means. My code is as follows:

home_dir = os.path.dirname(os.path.realpath(__file__))
test_file = os.path.join(home_dir, r"N040W010_N045W005\repr-N042W006_AVE_DSM.tif")
grid = Grid.from_raster(test_file, data_name='dem')
plotFigure(grid.dem, 'Elevation (m)')

The error I get is this:

CRSError: Invalid CRS input: CRS({'init': 'epsg:32630'})

I would love to mean what this means, I have changed the projection from a global to a local one, but with the global projection, I had the same error.

  • Check this thread Error reprojecting Landsat with rasterio – Taras Jun 28 '19 at 10:10
  • Thanks, so I should set the GDAL_DATA environment variable? But it's already set, how do I know for sure that the correct .csv file is in the folder? I do have the gcs.csv and pcs.csv files. – Maarten Jun 28 '19 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.