Hello,
I cannot find a solution for extracting those areas that are crossed by
a line. And further to find out, what areas are crossed by a network of
lines in order to union them into one area.
Its for combining subbasins which are part of a certain rivernetwork.
Has someone experience? Any hints are welcomed.
Thanks in advance,
achim
achim wrote:
Hello,
I cannot find a solution for extracting those areas that are crossed by
a line. And further to find out, what areas are crossed by a network of
lines in order to union them into one area.
Its for combining subbasins which are part of a certain rivernetwork.
What about r.water.outlet? You can get the exact coordinates for the the outlet point from the existing river network. Best would be to use the stream segments output of r.watershed as river network. That should give you the one area you are looking for.
...but how can I query my raster-streams in r.water.outlet? I cannot
write in all points manually. Do I have to write a script for that?
thanks,
achim
Markus Metz schrieb:
achim wrote:
Hello,
I cannot find a solution for extracting those areas that are crossed by
a line. And further to find out, what areas are crossed by a network of
lines in order to union them into one area.
Its for combining subbasins which are part of a certain rivernetwork.
What about r.water.outlet? You can get the exact coordinates for the the
outlet point from the existing river network. Best would be to use the
stream segments output of r.watershed as river network. That should give
you the one area you are looking for.
...and by the way: r.water.outlet seems not to work (like I do it*). I
only get one cell as basin-area...
* e.g.
r.water.outlet drainage=dem@achim basin=r_watershed_outlettest
easting=1028401.7422125897 northing=2929575.6860815384 --overwrite
achim schrieb:
...but how can I query my raster-streams in r.water.outlet? I cannot
write in all points manually. Do I have to write a script for that?
thanks,
achim
Markus Metz schrieb:
achim wrote:
Hello,
I cannot find a solution for extracting those areas that are crossed by
a line. And further to find out, what areas are crossed by a network of
lines in order to union them into one area.
Its for combining subbasins which are part of a certain rivernetwork.
What about r.water.outlet? You can get the exact coordinates for the the
outlet point from the existing river network. Best would be to use the
stream segments output of r.watershed as river network. That should give
you the one area you are looking for.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
achim wrote:
...but how can I query my raster-streams in r.water.outlet? I cannot
write in all points manually. Do I have to write a script for that?
You can query the raster streams in the GUI map display, then cut and paste the coordinates to r.water.outlet as easting and northing.
I'm not sure I understood your question correctly, clarification from my side: for each river network you need only one point/set of coordinates in r.water.outlet, namely the outlet point.
Regarding your other post, only one cell as output: this would happen if the outlet point specified for r.water.outlet is not exactly on the stream, but one cell (or more cells) off.
Going back to the vector approach, maybe v.overlay can help.
I have many rivers flow into sinks. For each I'd like to find out, whats
the hole watershed.
Moreover I have some predefined areas (like raster-cells), that must be
devided into their basins (with repect to the boundary cells).
So I have to define the points, where the river-network has its extreme
points/where the points with highest accumulation-values are.
I understand, that I need only one point for r.water.outlet:
-> how do I find out the E and N of the starting-cell? Its a CELL and
there are falling many coordinates within.
-> how do I give r.water.outlet a list of my desired "starting-cells"
(their coordinates)
btw: I tried with those small basins produced by r.watershed to extract
the boundaries crossed by rivers: that didn't work (with what I did). On
the other hand the outled solution would be a bit more precise, if it
would work 
achim
Markus Metz schrieb:
achim wrote:
...but how can I query my raster-streams in r.water.outlet? I cannot
write in all points manually. Do I have to write a script for that?
You can query the raster streams in the GUI map display, then cut and
paste the coordinates to r.water.outlet as easting and northing.
I'm not sure I understood your question correctly, clarification from my
side: for each river network you need only one point/set of coordinates
in r.water.outlet, namely the outlet point.
Regarding your other post, only one cell as output: this would happen if
the outlet point specified for r.water.outlet is not exactly on the
stream, but one cell (or more cells) off.
Going back to the vector approach, maybe v.overlay can help.
achim wrote:
I have many rivers flow into sinks.
Sounds like r.terraflow output.
So I have to define the points, where the river-network has its extreme
points/where the points with highest accumulation-values are.
In case of r.watershed, the stream segment output is more precise.
I understand, that I need only one point for r.water.outlet:
-> how do I find out the E and N of the starting-cell? Its a CELL and
there are falling many coordinates within.
Any set of coordinates falling within that cell should do.
BTW, r.terraflow flow direction must be modified before it can be used with r.water.outlet.
-> how do I give r.water.outlet a list of my desired "starting-cells"
(their coordinates)
You could call r.water.outlet repeatedly in a script.
Hi Markus,
thanks for these fine answers.
I used the new r.watershed-version, which is very fast and can handle
massive gids like r.terraflow (in grass64)
Yes, r.waterflow produces very good results, including stream-segments.
But I would have to vary the threshold manually and many times to get
all basins.
I attach an example-jpg to illustrate my point of view...
achim
Markus Metz schrieb:
achim wrote:
I have many rivers flow into sinks.
Sounds like r.terraflow output.
So I have to define the points, where the river-network has its extreme
points/where the points with highest accumulation-values are.
In case of r.watershed, the stream segment output is more precise.
I understand, that I need only one point for r.water.outlet:
-> how do I find out the E and N of the starting-cell? Its a CELL and
there are falling many coordinates within.
Any set of coordinates falling within that cell should do.
BTW, r.terraflow flow direction must be modified before it can be used
with r.water.outlet.
-> how do I give r.water.outlet a list of my desired "starting-cells"
(their coordinates)
You could call r.water.outlet repeatedly in a script.
(attachments)

achim wrote:
I attach an example-jpg to illustrate my point of view...
OK, I think I understand.
You could get the start points with r.mapcalc
r.mapcalc "start_points = if(!isnull(stream_segments) && drainage < 0, 1, null())"
convert the start points to vector
r.to.vect in=start_points out=start_points feature=point
get coordinates for each point with v.to.db map=start_points -p option=coor
ideally pipe the output of v.to.db to something that generates a script to call r.water.outlet with each set of coords, otherwise it's manual editing