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

r.stream.distance elevations with value of -1 [Bug] #982

Open
csmithud opened this issue Nov 14, 2023 · 0 comments
Open

r.stream.distance elevations with value of -1 [Bug] #982

csmithud opened this issue Nov 14, 2023 · 0 comments
Labels
bug Something isn't working C Related code is in C

Comments

@csmithud
Copy link

Name of the addon
r.stream.distance

Describe the bug
r.stream.distance incorrectly converts elevation difference values that == -1 to be null values. -1 is used as a placeholder for null values in the source code but it is conceivable that -1 could be a valid elevation difference value.

To Reproduce

  1. Create a stream raster and drainage direction raster based on an elevation dataset.
  2. Create a proxy elevation raster where the stream raster values are == 1 and the non-stream areas == 0.
  3. Run r.stream.distance with the following parameters: (direction = drainage direction raster, stream_rast = stream raster, elevation = proxy elevation raster, difference = output)

Expected behavior
One would expect that the output would be a raster with 0 along the stream line and -1 everywhere else but instead the function returns 0 along the stream line and nulls everywhere else.

System description (please complete the following information):

  • Linux Ubuntu 22.04.1 jammy
  • GRASS GIS version 7.8.1
@petrasovaa petrasovaa added bug Something isn't working C Related code is in C labels Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C Related code is in C
Projects
None yet
Development

No branches or pull requests

2 participants