Jim - one other thought... If you look at r.stream.distance, you see that internally it finds the stream outlet. Unfortunately it does not report it but if you go into the source python script, you can see how it is calculated and extract that bit of code for your own script. I've done similar translating the python into a POSIX (sh) script (mainly because I suck at python...lol). Chris
Chris Bartolomei P.E. Engineer/Scientist ENSCO, Inc. bartolomei.ch...@ensco.com ________________________________________ From: grass-user [grass-user-boun...@lists.osgeo.org] On Behalf Of Jim Maas [j.m...@uea.ac.uk] Sent: Tuesday, April 26, 2016 6:43 AM To: Blumentrath, Stefan; grass-user@lists.osgeo.org Subject: Re: [GRASS-user] simple way to get Easting and Northing coordinates of stream outlet directly from r.watershed? Hi Stefan, Thanks for this. I've had a look but not tried it yet. Just for me to clarify, are you suggesting that: 1. r.stream.basins will somehow produce and output the Easting and Northing values of the overall outlet? 2. r.stream.basins, will replace most of this workflow and thus the Eastings and Northings will not be required explicitly? In the case of 1, I can't quite see how it will output these values? Thanks a bunch, J On 26/04/16 14:02, Blumentrath, Stefan wrote: > Hi, > > Did you consider using: > https://urldefense.proofpoint.com/v2/url?u=https-3A__grass.osgeo.org_grass70_manuals_addons_r.stream.basins.html&d=CwIGaQ&c=DsZY2bea7iNIzyp-7sZ0t0F2UfNQZUfZhEPCv_2wBI0&r=O31ltou6ygJL2Y01kQyNJJD2kiILIsbyz2V0Hn4lFUY&m=uLWb19rS_9IrFOaSAkQeNfJ1qv_6HGtvzKSj16TxYN8&s=iQFFPiu77Qwcm1tmAu9f-H9-0rZQOG8HFgkRIUXvgs0&e= > ? > > Cheers > Stefan > > -----Original Message----- > From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of Jim > Maas > Sent: 26. april 2016 14:28 > To: grass-user@lists.osgeo.org > Subject: [GRASS-user] simple way to get Easting and Northing coordinates of > stream outlet directly from r.watershed? > > I'm using GRASS 7.0.3 (text) on Ubuntu Linux, and running it either from a > bash shell script or from an R file. > > I've worked out a workflow that does what I want, but it is very long and > convoluted, so I'm wondering if there is a simple way to extract the Easting > and Northing coordinates of the lowest point on the stream network, such that > I can then use them as inputs for r.water.outlet? > > Here is my workflow, realise it is long > > 1. run r.watershed to get drainage, streams, and basin 2. run > r.stream.order to calculate strahler order and get strahler > raster map > 3. use r.stats and some bash code to extract highest strahler number > from the strahler map > 4. use r.mapcalc .... not sure why, inherited this bit from someone! > 5. use r.stats to get data from stream dem into a text file 6. use some > bash and awk code to extract the Easting and Northing > values of the lowest point in the text file created from the stream dem > 7. use r.water.outlet to create new drainage map for the basin 8. use r.lfp > to calculate longest flow path, also uses the Northing > and Easting values of the outflow point > > > So I guess what I'm looking for is a simpler way to get the Northing and > Easting values of the lowest point, directly from r.watershed or something > analogous. > > All suggestions most welcome. Thanks > J > > -- > Dr. Jim Maas > University of East Anglia > > _______________________________________________ > grass-user mailing list > grass-user@lists.osgeo.org > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.osgeo.org_mailman_listinfo_grass-2Duser&d=CwIGaQ&c=DsZY2bea7iNIzyp-7sZ0t0F2UfNQZUfZhEPCv_2wBI0&r=O31ltou6ygJL2Y01kQyNJJD2kiILIsbyz2V0Hn4lFUY&m=uLWb19rS_9IrFOaSAkQeNfJ1qv_6HGtvzKSj16TxYN8&s=1QihHldi_jAaJN_Jzs5qtFb-hG4ZZFYRLI7AhntJ1bk&e= -- Dr. Jim Maas University of East Anglia _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.osgeo.org_mailman_listinfo_grass-2Duser&d=CwIGaQ&c=DsZY2bea7iNIzyp-7sZ0t0F2UfNQZUfZhEPCv_2wBI0&r=O31ltou6ygJL2Y01kQyNJJD2kiILIsbyz2V0Hn4lFUY&m=uLWb19rS_9IrFOaSAkQeNfJ1qv_6HGtvzKSj16TxYN8&s=1QihHldi_jAaJN_Jzs5qtFb-hG4ZZFYRLI7AhntJ1bk&e= The information contained in this email message is intended only for the use of the individual(s) to whom it is addressed and may contain information that is privileged and sensitive. If you are not the intended recipient, or otherwise have received this communication in error, please notify the sender immediately by email at the above referenced address and note that any further dissemination, distribution or copying of this communication is strictly prohibited. The U.S. Export Control Laws regulate the export and re-export of technology originating in the United States. This includes the electronic transmission of information and software to foreign countries and to certain foreign nationals. Recipient agrees to abide by these laws and their regulations -- including the U.S. Department of Commerce Export Administration Regulations and the U.S. Department of State International Traffic in Arms Regulations -- and not to transfer, by electronic transmission or otherwise, any content derived from this email to either a foreign national or a foreign destination in violation of such laws. _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user