Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] v.stream.order doesn't work on Grass 8 #4515

Open
TheJoseph24 opened this issue Oct 14, 2024 · 2 comments
Open

[Bug] v.stream.order doesn't work on Grass 8 #4515

TheJoseph24 opened this issue Oct 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@TheJoseph24
Copy link

TheJoseph24 commented Oct 14, 2024

Describe the bug

Hi!
I'm currently trying to assign the strahler order to a river basin. I already have the line feature. The lines are all connected and it seems there are no topology errors. I then created a point shapefile, using a processing tool in QGis, to indicate the direction of the flow. Every point is situated at the first vertex of each line, which is the exit point of the water. After importing the two files to a grass project, I select only the strahler order, leaving everything else at default, and run the tool. It alerts me to a bunch of duplicated edges (I don't know why) and then it gives me an error related with the start id.
I'm new to python and Grass and I can't figure this out. Can someone tell me if there is something I'm missing?
Thank you

Edit
I´m going to drop a Mega link to all the files i´m working with. There you can find the waterlines and the exit points vector files, as well as the Grass Workspace:
https://mega.nz/folder/Vg0TSYSI#Nvwm-iXkcj19hfh8kb07jA

(Mon Oct 14 16:16:55 2024)                                                      
v.stream.order input=Linhas_de_agua@PERMANENT points=Exutorios@PERMANENT output=order order=strahler
WARNING: Column name conflict: Renaming column <cat> from input map into cat_1 in output map
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
WARNING: Ignoring duplicated start edge
Traceback (most recent call last):
  File "C:\Users\unive\AppData\Roaming\GRASS8\addons/scripts
/v.stream.order.py", line 621, in <module>
    main()
  File "C:\Users\unive\AppData\Roaming\GRASS8\addons/scripts
/v.stream.order.py", line 614, in main
    detect_compute_networks(
  File "C:\Users\unive\AppData\Roaming\GRASS8\addons/scripts
/v.stream.order.py", line 576, in detect_compute_networks
    traverse_graph_create_stream_order(
  File "C:\Users\unive\AppData\Roaming\GRASS8\addons/scripts
/v.stream.order.py", line 178, in
traverse_graph_create_stream_order
    current_edge = edges[start_id]
                   ~~~~~^^^^^^^^^^
KeyError: 280
(Mon Oct 14 16:18:04 2024) Command ended with non-zero return code 1 (1 min 9 sec)
@TheJoseph24 TheJoseph24 added the bug Something isn't working label Oct 14, 2024
@petrasovaa
Copy link
Contributor

It would help to have a reproducible example.

@TheJoseph24
Copy link
Author

TheJoseph24 commented Oct 15, 2024

It would help to have a reproducible example.

Hi, thank you for aswering. I´ve dropped a link to a folder with all the necessary files. I hope you can help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants