perrygeo/python-raster-stats — pull request #31 by timcera (2014-06-03 14:00:55+00:00)
Title: Fix for when src_array was none

I am not following some of the logic, so this is a hack of a fix for a problem that I was having. I think this fix is minimally disruptive to everything else, but with more understanding could probably be handled in a better way.

Basically I was coming to a polygon that would result in src_array equal to 'None', which caused a failure in the creation of the 'masked' variable. I just create a src_array of the correct size and populate with nodata_value.

This fix works for me.

Thank you for rasterstats. It saved me a lot of work.

Kindest regards,
Tim