Giter Site home page Giter Site logo

Comments (5)

mdbartos avatar mdbartos commented on August 15, 2024

Greetings,

It's been several years since I wrote the original implementation, so I think refactoring would certainly be a good idea. Namely, the current implementation uses a list to store visited cells, which may not be ideal memory-wise. It would probably be better to just use a boolean array. I'm not sure if getting rid of the recursion would necessarily help with memory consumption.

What size DEM are you using?

from pysheds.

DominiqueBrunet avatar DominiqueBrunet commented on August 15, 2024

The original DEM I am using is about 17000x18000 pixels, but the bug occurs even when I crop it to about 1500x1200.

Getting rid of recursion worked for me without memory problem.

from pysheds.

mdbartos avatar mdbartos commented on August 15, 2024

Greetings,

I'll take a look at this issue soon. It shouldn't be crashing on a DEM of that size though. See this example for instance (5000 x 5000): https://github.com/mdbartos/pysheds/blob/master/examples/no_metadata.ipynb

It may be that you are calling the function on the original data source rather than the clipped 'view' of the data.

from pysheds.

DominiqueBrunet avatar DominiqueBrunet commented on August 15, 2024

The clipped DEM for six different larger watersheds lead to a crash, but other smaller ones worked fine, so I don't think it has to do on how I clipped the data.

I can try to extract and package the data and code that generated the error if you want. How would you like the data?

from pysheds.

mdbartos avatar mdbartos commented on August 15, 2024

Greetings, this should be fixed in v0.3, as the python catchment function has been reimplemented in numba. Please reopen if the issue persists.

from pysheds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.