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

ElevationAboveStreamEuclidean ignores DEM nodata values #245

Open
Atreyagaurav opened this issue May 18, 2022 · 0 comments · May be fixed by #377
Open

ElevationAboveStreamEuclidean ignores DEM nodata values #245

Atreyagaurav opened this issue May 18, 2022 · 0 comments · May be fixed by #377
Labels
bug Something isn't working

Comments

@Atreyagaurav
Copy link

Atreyagaurav commented May 18, 2022

Hi, so I don't know if it's intentional, but I couldn't find any documentations on this.

I recently found out that the tool ElevationAboveStreamEuclidean assumes all non zero cells are streams, and the cells with value of zero are the cells we need the elevation information from. And the source code on the file doesn't check for nodata on the dem.

Since the variable for streams is named input, it was a bit confusing, so I wanted to ask if it was intentional.

If it's intentional then we may have to check for nodata in the dem also as a condition for passing nodata in the output dem since the code doesn't do that as far as I understood.

If it wasn't meant to be, I tried to modify it slightly and saw that we can ignore the nodata for streams and only use the nodata from dem as the condition for output cells being nodata.

Here's my commit in my fork with a slight change:
Atreyagaurav@d27a269

The reason I think the nodata for streams should be ignored is because the tool to generate the streams raster: ExtractStreams as well as StreamOrder tools gives a raster where all the cells except for the stream cells are no-data, so running ElevationAboveStreamEuclidean directly on that raster gives us useless raster with only zero elevation in the streams cells.

I also tried to see if I could do modifications in the tool ElevationAboveStream, but it turned out to be even more complex, so I am yet unable to do it.

If I'm on a right track I can make a pull request. And add more edits to fine tune it as required.

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

Successfully merging a pull request may close this issue.

2 participants