Alright, so new changes to FLOWS! Basically what was happening was: Some HUGE basins showed up, and the program was exceeding my humble 8gb of RAM when trying to generate a diagnostic image (that also happened on cuts where there were thousands of basins). BUT after some tinkering, I discovered that I was doing some very heavy processes on image generation that were not necessary. So I adapted my code, and now a whole terrain cut of 160k square kilometers (about 39 million acres) can be processed without crashing!
Alright, so new changes! Today I tried to make a DEMO for my project! Since the user is originally intended to provided topological files (that for demonstration purposes may not be available), I have also packaged inside the .sh file a DEMO version, that has its own very small dataset, so everyone can see the project in action even without the needed files.
Another day and guess what: another feature! I added a new function to the code that takes in a “starting point” for basin compilation. What this does is, given a starting point integer provided by the user (call it S), it skips all basins with an ID lower than S. This is good ’cuz we can stop the code with control + C and later keep on where we left by choosing our last compiled basin as our starting point! I probably should have done this a long time ago instead of right know when I actually needed it, but hey: Better late than never am i right?
YEEEEAAAAH! I decided to try and create an executable for my script, and boy was hard. The problem was that major libraries like gdal and whitebox required a bunch of other system libraries to work. This means I had to try to get them into the executable, and let me tell ya: This took a lot of time. But finally, it works (i hope)! I will be posting the executable (linux only of course) on github later!
Update on compilation: Well, a lot of stuff happened. I can’t really keep my computer running non stop all day and night, so I was resorting to suspending the laptop so runtime would keep frozen in RAM. But today, after a week of running the program and almost halfway left, I woke up to find the computer out of battery (probably it kept running in suspend mode and just died). That was quite devastating, but the only thing I could do was to update my code with checkpoints so that if that happens again, I won’t need to run everything again like I’m about to do now. I took that chance to also fix some typos in my README and my github pages, so I guess I got something good out of this!
Making some minor changes so my github before posting my project!
Finally able to find bowl-like depressions now
Writing a pdf devlog for my project!
Just discovered this nice tool called WhiteBoxTools, and was also able to find its user manual! Now I won’t need to process terrain from scratch, and instead get I can all the data I’m looking for without reinventing the wheel.
Figured out how to read a digital elevation model with python