mdbartos / pysheds

:earth_americas: Simple and fast watershed delineation in python.
GNU General Public License v3.0
707 stars 191 forks source link

Calculate HAND fast with Numba #93

Closed j08lue closed 2 years ago

j08lue commented 5 years ago

I can see PySheds has an implementation of HAND that could use a bit of care (judging from the TODOs and try ... excepts...). While I unfortunately can't provide that care right now, a colleague a while back made a neat implementation using Numba that I am happy to share if it can be used here. https://gist.github.com/j08lue/04c8df062e54390fbc704187a497da14 It is set up to use flow dir and stream network computed with GRASS GIS, but can probably easily be adapted. What do you think?

mdbartos commented 5 years ago

Hi @j08lue, looks cool! I've been interested in applying numba to pysheds myself (to ensure portability, it might be best to make it an optional dependency though). It would be interesting to see how the performance compares.

j08lue commented 5 years ago

to ensure portability, it might be best to make it an optional dependency though

Well, if someone is able to install your current dependencies, you can be pretty sure they can also do numba. 😄

https://github.com/mdbartos/pysheds/blob/f1d8d3f19a760de36077f3fb093d7a4e3a5550db/setup.py#L13-L21

mdbartos commented 2 years ago

Addressed in #143