How can I find the Strahler order of a drainage network in Mathematica? For example the link created by joining links of order $i$ and $j$ is given by $k=max(i,j,Int\frac{1}{2}(i+j))$. The image of the drainage network is attached below. I have created the Skeleton graph of the original binary image by Morphological processing ie., by repeated erosion and dilation. I want to ascertain the network properties of the graph.
i=Import["D:\\class_shp_1.png"]
im=MorphologicalBinarize[i]
imo=Opening[im,DiskMatrix[15]]
ime=Erosion[imo, DiskMatrix[1]]
imed=Dilation[ime,DiskMatrix[1]]
imedel=DeleteSmallComponents[imed]
imedt=Thinning[imedel, Infinity]
imsk=SkeletonTransform[imedt]
immorph=MorphologicalGraph[imsk,VertexLabels->"Name"]
This generates the Graph as shown below for which I want to assign the Strahler order for each link.
The strahler order for rivers is given by the above mentioned formula for $k$.
DepthFirstScan
and"PostVisitVertex"
. The next version of IGraph/M will include this (implemented in C, not as mentioned here). Teaser: i.stack.imgur.com/m2tmQ.png $\endgroup$ – Szabolcs Nov 26 '18 at 10:29