Skip to content

Adding attribute to PPS object from XY data #52

Answered by wschwanghart
gguryan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

unfortunately, marks have so far not gotten much attention. Maybe this should be something to look into the future. In fact, PPS was designed to also hold marks and covariates.
Still, for your application, there could be a work-around:

DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
FD  = FLOWobj(DEM);
S = STREAMobj(FD,'minarea',1000);
S = trunk(klargestconncomps(S,1));

% Bould locations
IX = randlocs(S,100);

% Caxis length
ca = random(makedist('Exponential','mu',3),100,1);

% Channel segments
label = labelreach(S,"seglength",2000);

% PPS
P = PPS(S,"PP",IX,"z",DEM);

% Sum of Caxis length in each channel segment. You could also calculate the
% median, mean, ... using the anonymous f…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by wschwanghart
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants