-
Notifications
You must be signed in to change notification settings - Fork 161
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
elevation_above_stream_euclidean producing empty tif #35
Comments
and I forgot to mention that the wbt.elevation_above_stream line works. |
@erikafreeman I just tested this tool on a sample DEM that I had and it worked as expected. Can you share your DEM and stream file so that I can try to replicate your issue? |
I suspect that this issue was related to the GeoTIFF reader/writer and has now been resolved and so I am closing it. My testing with the tool does not show any issue. If you encounter any further problems, please feel free to re-open it. |
The problem is not from GeoTIFF, but from the algorithm. I've mentioned it here: #245 Maybe you ignored it thinking it's the issue from ourside the whitebox tools. The problem is, the tool masks the value if "streams" raster has no_data values on it. For the streams file normally generated, it's fine as it has 1 for streams and 0 for others, but if you've run it through the ordering algorithms, then it'll have numbers for streams and no_data for others, in that case the algorithm will only output values on the streams and have mostly empty output. You can find the fix that I purposed at that time on the linked issue. But the code seems to have changed since then, I can open up a pull request with a new code if I can figure out what to change on the new one again. Here are some files that you can use to replicate it in the latest version. https://drive.google.com/drive/folders/16BPmX8jI8xJGFsKIHcQjioJ2b5Qjx4Ya?usp=sharing You can try to run it with |
I have a script that uses both the elevation_above_stream_euclidean and the elevation_above_stream tools. The inputs are the same.
These are the lines of code:
wbt.elevation_above_stream(dem= path+name+tif, streams= name + '_'+ n + 'streams.tif', output= name + '' + n + 'HAND.tif')
wbt.elevation_above_stream_euclidean(dem= path+name+tif, streams=name + '_' + n + 'streams.tif', output= name + '' + n + 'HANDe.tif')
However, the wbt.elevation_above_stream_euclidean produces an empty .tif without throwing an error.
The text was updated successfully, but these errors were encountered: