Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Rasterzie_streams handling nodata

14 views
Skip to first unread message

martin tomko

unread,
Aug 7, 2024, 2:14:05 PM8/7/24
to WhiteboxTools
I have a masked area (using nodata values) outside of my area of interest. Within the AOI I would like to use the rasterize_streams ( and later, to compute the Euclidean_Distance.

As such, I need to rasterize streams to a binary raster, and maintain the nodata value outside of the mask, for input to the euclidean_distance tool ( which explicitly states that a nodata value is not a good choice for background cells, in order to be able to distinguish them.

My rasters have a correctly set nodata value ( checked with gdalinfo).

Yet, rasterize_streams seemsto set all to 0, and overwrites the nodata values.

My command, in python, is:

 wbt.rasterize_streams(streams,dem,output_file_name_rasterstreams,nodata=False,feature_id=True,callback=my_callback). I have tried without the feature_id too. 

It seems that wbt is ignoring the nodata flag? Any hints?
Reply all
Reply to author
Forward
0 new messages