Skip to content

Get most upstream nodes that fulfill condition #46

Discussion options

You must be logged in to vote

Hi Richard,
I think there's no function right now to do this (but we could add one, if needed). However, here's a solution:

DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
FD  = FLOWobj(DEM);
S   = STREAMobj(FD,'minarea',300);

locrel  = localtopography(DEM, 1000);
elev_min = 300; % minimum elevation of outlets;
elev_max = 700;
locrel_threshold = 100;
stream_elevation = getnal(S,DEM);
stream_relief = getnal(S,locrel);
IX_correct_elevation = and(stream_elevation < elev_max, stream_elevation > elev_min)  ; 
IX_correct_relief = stream_relief < locrel_threshold;
IX_candidates = and(IX_correct_elevation, IX_correct_relief);

% Now find the most upstream candidates. 
hasUpstream = false(size(S.x…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Richard-Ott
Comment options

@wschwanghart
Comment options

Answer selected by wschwanghart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants