Comments (5)
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.
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.
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.
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.
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)
- How to create Flow Distance raster same shape as DEM raster?
- Re-evaluate Numba performance HOT 2
- Allow Numba to perform polymorphic dispatching HOT 5
- Can't 'imshow' DEM for some unkown reason HOT 1
- extract_profiles function returning wrong connections when neighbouring cells drain to outlet
- strang plots HOT 1
- Allow user to disable `parallel=True` with numba HOT 2
- Why stream network `LineStrings` do not pass through the centroid of each grid cell? HOT 1
- accumulation issue HOT 3
- Preprocessing DEM with pysheds seems to produce incorrect accumulations HOT 11
- Using catchment() with discharge point outside of extents crashes program
- sGrid and pGrid have major differences
- Pysheds Cupy / Cuspatial support HOT 1
- Accumulation disconnections HOT 4
- setup fail by github repo of latest release version
- Pixels that should be accumulation watercourses are shown as nodata HOT 2
- Wrong bbox when using `ViewFinder` HOT 3
- issue in pygrid with np.int and np.warnings
- D8 and Dinf flow directions look incorrect HOT 4
- Indexing Error in _d8_distance_from_ridge
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysheds.