Skip to content

Add Algorithms#8

Merged
wschwanghart merged 5 commits into
TopoToolbox:mainfrom
Teschl:algos
Jan 26, 2026
Merged

Add Algorithms#8
wschwanghart merged 5 commits into
TopoToolbox:mainfrom
Teschl:algos

Conversation

@Teschl
Copy link
Copy Markdown
Contributor

@Teschl Teschl commented Jan 16, 2026

This contains all existing at the time of closing #1 . extract_streams and stream_network do the same thing, so probably would have to be merged into one (or one of removed). There are also some issues with Shapefile results being offset by half a pixel. This why I'm opening this as a draft for now. To test this while the other pull requests (#5 , #6 , #7) are not merged jet, use the tmp branch.

@wschwanghart
Copy link
Copy Markdown
Contributor

Hi @Teschl , there are some conflicts that should be resolved. I guess you are better at doing this than me.

@Teschl
Copy link
Copy Markdown
Contributor Author

Teschl commented Jan 19, 2026

That was due to having already added the file in a pull request before, it's resolved now @wschwanghart . I'll try to combine extract_streams and stream_network into one function, with the option to decide which output is wanted. Also, I'm still working on shifting the resulting vector layer of stream_network into the right position. I'll mark this pull request as ready for review and mention you once that's done.

@Teschl Teschl marked this pull request as ready for review January 23, 2026 18:07
@Teschl
Copy link
Copy Markdown
Contributor Author

Teschl commented Jan 23, 2026

I decided against putting both the stream_network vector and the raster version in the same Algorithm, since both outputs would always have to be defined. So in my opinion it's better to just separate them while giving them a similar name (StreamNetworkRaster and StreamNetworkVector).

I also added the option in the StreamNetworkVector function to shift the vertices into the middle of each pixel of the DEM it's based on.

There is one issue reaming with this function: running it twice after another will crash QGIS. I have not been able to pinpoint why this happens. It's not the shifting, I don't think it's the to_shapefile() function, since this works when running it on its own again and again. My theory at the moment is, that it has something to do with the automatically generated output path, but have not been able to figure out how to fix it.

In my opinion it's fine for now, since this is a very early version, but this issue is something to keep in mind (I will create an issue to keep track of it). If you're ok with this should be ready to merge @wschwanghart

@wschwanghart wschwanghart merged commit 030b4b8 into TopoToolbox:main Jan 26, 2026
1 check passed
@Teschl Teschl deleted the algos branch January 30, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants