# Calc bottomline of valleys

Which way do I calculate bottomlines of valleys or even more preceise: which way do I "find" valleys (for example suggested tectonic faults).

Sample below shows a height profile (profile from line) based on Aster data and it's that I at most want to follow the larger valleys (long arrowed lines).

I could go for hydrological methods (even though havent been working with them), but using hydro plugins/tools a small breakthrough to lower areas would cause a runoff, while I want to follow the big valley.

Any ideas?

--- (edited) To underline my problem, I've just taken a circa bottom line profile of the valley pointed to by the most left arrow in pic-1 (arrow'ed). The intersection is at about 8km of 1st diagramm (with arrows) and at km 35 of second profile.

---- (edited) Just to spread some ideas: Rotating the 1st image arount the center between point 1 an 2 (1st and 2nd arrow, Height Profile) also shows "valleys" with different idth/height ratios, but still significant.

QGIS 1.8, Ubuntu, Aster Elev Data

First and second "sharp" valley from left (large arrows) are of most interesting to get the idea. It might help to focus on focusing on strong beeing above/below average. Just an idea :-/

-
I don't understand the "small breakthrough" issue. Hydrological methods make a (crude) estimate of total runoff; you then identify the cells where that estimate exceeds a (rather large) threshold. This eliminates all valleys whose total catchment is less than the threshold, leaving a network of apparent stream centerlines to delineate the largest valleys. – whuber Dec 17 '12 at 19:19
@whuber: Ref to the small breakthrough.... suggest simple some kind of terrace (your place to sit in the evening if owning a hillside home). If there would be a - in compare to whole surface - small hole within right in the middle at a slightly deeper location, the water would run off.... but netherless the terrace continues. Sorry - I'm not a native english speaker, so sometimes I have to give very self-plaining visible and simple examples to explain my thoughts/ideas and intensions. – Chris Pallasch Dec 17 '12 at 20:48
I do not follow your example. Do you, or do you not, want such a "small terrace" to be considered a "valley"? If you do, set the flow accumulation threshold low; if not, set the threshold higher. – whuber Dec 17 '12 at 20:52
@whuber - (skippinh hydrology) your ideas/thoughts are pretty difficult for me to translate; but if I did not get it totally wrong, you do pretty much understand my problem - any why I cant use hydrologic plugins/tools - and where I'm heading for! – Chris Pallasch Dec 17 '12 at 20:53
@whuber - I'm searching the big terraces. I do not want to follow the run off. My english is awful, sadly, I do know :-/ Say there would be a hole in the middle of Golden Gate Bridge covering 2-4 lanes (6 total if I recall my holiday some 20+ years ago) ---- I still want to go straigt on an not fell into the hole, following the bridge! – Chris Pallasch Dec 17 '12 at 21:01

I assume that your graphs came from a R-script and that you are capable of using R. Here is a solution in R, which finds local maxima and minima along a data sequence

``````x <- rnorm(50,mean=1500,sd=800) # Example-Data
r <- rle(x) # Generate run sequence object

min <- which(rep(x = diff(sign(diff(c(-Inf, r\$values, -Inf)))) == 2,
times = r\$lengths))
max <- which(rep(x = diff(sign(diff(c(-Inf, r\$values, -Inf)))) == -2,
times = r\$lengths))
plot(x,type="l")
points(x[min]~min,pch=19,col="red") # Plots the minima points
points(x[max]~max,pch=19,col="blue") # Plots the maxima points
``````

-
That identifies local minima of a single profile, but I believe the question asks to identify valleys within a two dimensional region: the profile was offered only as an illustration. – whuber Dec 17 '12 at 19:17
@Curlew: Sadly these are no R-Results, due to I learned /read knowledge of R would help me a lot :-/ Could you please point me to a suitable R newbie Documentation plus maybe an documented example for local min/max calculations? -> quick entry for local min/max calc. – Chris Pallasch Dec 17 '12 at 19:28
@whuber: yes you are right. Profiles are circa 1st NE-SW, 2nd W-E The "to calculate" line doesnt need to focus on 3D (height in the end is unnecessary), but simly show the 2D path of the valley. – Chris Pallasch Dec 17 '12 at 19:34
Imagine a huge rotovator driving up and down on a random path through a mountain area..... I want to follow it's path! – Chris Pallasch Dec 17 '12 at 19:42
nah, sorry. Obviously i misunderstand your question (and i still do). Maybe instead of a straight line you could look for the local minima/maxima in a polygon (2D), where the z-axis equals the elevation. Sth. like this (tinyurl.com/cpxevju) ? – Curlew Dec 17 '12 at 22:11