<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks Tom,<br>
      this is what I meant by looping over each subbasin, but that is
      exactly what I would like to avoid as it would take a lot of time
      for 1000+ subbasins and I dont really need all the other analysis.<br>
      <br>
      Cheers,<br>
      Michel<br>
      <br>
      On 02/16/2014 05:58 PM, Thomas Adams wrote:<br>
    </div>
    <blockquote
cite="mid:CAGxgkWhz0pFnWJ4BFeRnO4H_UAwFc-yRdgkVQVgmWkfLhjun6Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">Michel,
        <div><br>
        </div>
        <div>If you do what you suggest, but first apply a MASK using
          each subbasin; so, when you calculate the statistics, they
          will be for one subbasin at a time; with a very simple script
          you could loop through each subbasin.</div>
        <div><br>
        </div>
        <div>I hope this helps.</div>
        <div><br>
        </div>
        <div>Cheers!</div>
        <div>Tom</div>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Sun, Feb 16, 2014 at 11:07 AM,
            Michel Wortmann <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:wortmann@pik-potsdam.de" target="_blank">wortmann@pik-potsdam.de</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list,<br>
              I'm looking for a way to calculate the main channel length
              and width for a large number of subbasins within a river
              basin. I understand that the r.stream.* addon / R.basin
              gives me the main channel length along with a tone of
              other statistics but only for one catchment. Of course, I
              could loop over all my subbasins and calculate the
              statistics one by one, but I fear that will be time
              consuming and I dont actually need all the other analysis.<br>
              <br>
              I have got an efficient way to calculate the mainstream
              for each subbasin as a vector, but I'm struggling to get
              from there to the distance of the longest segment in each
              subbasin. Maybe someone has an idea to complete this idea
              of a work flow:<br>
              <br>
              raster=mainstreams (thinned raster with unique categories
              for each subbasin)<br>
              <br>
              r.to.vect to vectorise, this unfortunately gives me line
              segments crossing over subbasin boundaries<br>
              <br>
              somehow make stream segments from each subbasin<br>
              <br>
              v.to.db to measure the distance of each line segment<br>
              <br>
              choose the longest distance for each subbasin<br>
              <br>
              <br>
              Any suggestions/help would be much appreciated.<br>
              Regards,<br>
              Michel<br>
              <br>
              _______________________________________________<br>
              grass-user mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.osgeo.org/mailman/listinfo/grass-user"
                target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
            </blockquote>
          </div>
          <br>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>