I just need to finish the year with a quick blog entry… And this one is – once again – about chi maps.
I thought about different ways to display chi maps. chi maps are usually plotted using stream networks. However, to this end, chi maps are not so much about stream networks but rather about drainage divides and how they potentially migrate in the future. In addition, the distance of potential divide migration depends on the relative difference of chi values on either side of the divide, not so much on the absolute values. How could we create a map that reflects this information
Here is an idea: First, we create a chi transform of the river network (see function chitransform). Then we map these chi-values to the entire grid. This can be accomplished with the new function mapfromnal which lets you map values from a stream network to its nearest upstream contributing pixels. Then, we will derive some-pixel wide fringes of chi values around the divides and calculate their spatial average. Dividing the chi values by these spatial averages then quantifies the degree to which some part of the divide is either a victim or an aggressor. Since victims have higher values, I call this metric the chi-inferiority.
Now here is the code:
DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif'); FD = FLOWobj(DEM); S = STREAMobj(FD,'minarea',500); S = removeedgeeffects(S,FD); [~,zb] = zerobaselevel(S,DEM); A = flowacc(FD); c = zb + chitransform(S,A); C = mapfromnal(FD,S,c); D = drainagebasins(FD,S); for r = 1:max(D) I = D==r; I = erode(I,ones(21)) & I; C.Z(I.Z) = nan; end C1 = dilate(C,ones(21)); C2 = erode(C,ones(21)); C = C/((C1 + C2)/2); imageschs(DEM,C,'colormap',ttscm('vik'),... 'colorbarylabel','\chi-inferiority',... 'ticklabels','nice'); hold on plot(S,'k') hold off
Happy New Year everone!