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

vector_stream_network_analysis function fails due to missing arguments #78

Open
speleophysics opened this issue Nov 15, 2024 · 0 comments

Comments

@speleophysics
Copy link

  • whitebox version: 2.3.5
  • Python version: 3.12.7
  • Operating System: Windows or Linux

Description

I was trying to run the vector_stream_network_analysis tool and kept getting errors about arguments. First off, it was cutting_height.
Removing cutting_height lead to errors about dem being undefined. I looked at the code, and it looks like the dem and cutting_height arguments were removed in b2dbc20. However, these variables are still used by the code inside function. I'm not sure if they were accidentally removed, or if the functionality has changed, and they also need to be removed from inside the function. I suspect this is the source of my problems.

What I Did

stream_order_shapefileName = 'rush-creek-stream-order.shp'
stream_order_path = os.path.join(directory, stream_order_shapefileName)

wbt.vector_stream_network_analysis(
    stream_shapefile_path, 
    filled_path, 
    stream_order_path, 
    cutting_height=10.0,
    snap=0.1,
)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[15], line 4
      1 stream_order_shapefileName = 'rush-creek-stream-order.shp'
      2 stream_order_path = os.path.join(directory, stream_order_shapefileName)
----> 4 wbt.vector_stream_network_analysis(
      5     stream_shapefile_path, 
      6     filled_path, 
      7     stream_order_path, 
      8     cutting_height=10.0,
      9     snap=0.1,
     10 )

TypeError: WhiteboxTools.vector_stream_network_analysis() got an unexpected keyword argument 'cutting_height'

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

No branches or pull requests

1 participant