Replies: 1 comment 1 reply
-
Hi @DSKgeo, The DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
FD = FLOWobj(DEM);
S = STREAMobj(FD);
% We need the linear index of the source pixel in the DEM, if you have the
% (x,y) coordinates, coord2ind can get the linear index for you.
IX = coord2ind(DEM,393699,3804210);
S2 = modify(S,'downstreamto',IX);
imageschs(DEM,[],'colormap',[.9 .9 .9],'colorbar',false);
hold on
plot(S,'k')
plot(S2,'r')
hold off This will also work if you supply vectors of coordinates to The coordinates you supply need to be part of the stream network already. If they are not, you can extract the downstream flow path from your point using DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
FD = FLOWobj(DEM);
I = influencemap(FD, 393699,3804210);
S = STREAMobj(FD, I); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying to extract the longitudinal profile and other indices of a specific river within a basin, which is not the trunk stream. I attempted to do this by providing the coordinates of the headwater of that stream, but when I snap the point to the stream network, it snaps to the nearest stream which happens to be upstream of the point. I want to perform the analysis on the stream downstream of the given point. I am bit new to MATLAB. Could you please help me understand the correct approach and code to use?
Beta Was this translation helpful? Give feedback.
All reactions