I need to calculate D-Infinity Flow Direction on my input raster (geotiff). I use pygeoprocessing for this. Since I uninstalled the version that I had (0.2.2) and installed a newer version of the python package (0.4.4), I've not been able to calculate flow direction using pygeoprocessing.routing.flow_direction_d_inf module. I get the error message "AttributeError: 'NoneType' object has no attribute 'GetProjection'" which I am assuming means that it wasn't able to load the input image to get it's attributes.
This is what I type in at the Python Idle GUI:
>>> import os >>> import sys >>> import pygeoprocessing >>> import pygeoprocessing.routing >>> from osgeo import gdal >>> pygeoprocessing.routing.flow_direction_d_inf('C:\\Projects\\data\\work\\DemPrime.tif', 'C:\\Projects\\data\\work\\DIFD.tif') File "C:\Python27\ArcGISx6410.1\lib\site-packages\pygeoprocessing\routing\routing.py", line 331, in flow_direction_d_inf elevation_raster_path_band, target_flow_direction_path) File "src\pygeoprocessing\routing\routing_core.pyx", line 711, in pygeoprocessing.routing.routing_core.flow_direction_inf (src/pygeoprocessing/routing\routing_core.cpp:12951) File "C:\Python27\ArcGISx6410.1\lib\site-packages\pygeoprocessing\geoprocessing.py", line 979, in get_raster_info raster_properties['projection'] = raster.GetProjection() AttributeError: 'NoneType' object has no attribute 'GetProjection'
Has anyone else run into problems when upgrading pygeoprocessing?