<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;" bidimailui-charset-is-forced="true"
    bgcolor="#FFFFFF" text="#000000">
    Hello Luca:<br>
    The procedures I'm aware of all require to start from a DEM. <br>
    <br>
    In your case, starting from a shapefile:<br>
    <ol>
      <li>If you have access to the original DEM that was used to create
        the stream network, then GRASS has another addon, v.strahler
        that can recreate a table of strahler orders for each stream
        reach from the stream vector layer + DEM.</li>
      <li>If the shapefile is from some unknown source, and it's not too
        large, then you could attach stream orders manually to each
        stream reach. First you should insure that the shapefile is
        topologically correct, i.e. every junction in the stream network
        is indeed a node. That is, each stream reach is a separate line
        segment in the geometry. You can do this easily by importing the
        shapefile into GRASS and running v.clean with the tools
        "break,rmdangle". The "break" tool makes sure that the line
        features always have a node at every junction of two stream
        reaches. The "rmdangle" tool cuts off small dangles when a
        stream reach overshoots the next downstream tributary. <br>
      </li>
      <li>Once you have a topologically clean stream network, then add
        an attribute column for stream order. Now you can manually go
        from each "leaf" section of the stream network and allocate the
        stream order, working you way downstream. The rules are: <br>
      </li>
      <ol>
        <li>leaves get order 1</li>
        <li>when two tributaries of the same order 'n' join, the next
          downstream reach get order 'n+1'. <br>
        </li>
        <li>When two tributaries of different order join, the next
          downstream reach gets the same order as the highest.  You can
          read this more formally here: 
          <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/Strahler_number#Definition">https://en.wikipedia.org/wiki/Strahler_number#Definition</a></li>
      </ol>
      <li>If your shapefile is too large to enter all the values by
        hand, then I don't have any suggestions :-( <br>
      </li>
    </ol>
    Hope that helps.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 07/16/2015 10:31 PM, Luca Galuppini
      wrote:<br>
    </div>
    <blockquote
cite="mid:CA+OpnTvbmB_bL-KuKuVwq1ni5x65Jr2e25OhdxcoeGAuZA87tA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Dear Micha<br>
              <br>
            </div>
            the page you are linking seems to do exactly what i
            meant,although i am not familiar with grass commands and how
            to use them (and where to start :)) thank you for the hint!
            i see that the tutorial starts from scratch, obtaining a
            river network from a DEM. in my case i should start with a
            ready made shapefile, is it possible to classify it?<br>
          </div>
          all the best<br>
          <br>
        </div>
        Luca<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2015-07-16 20:39 GMT+02:00 Micha Silver
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div style="direction:ltr" bgcolor="#FFFFFF" text="#000000">
              I do this by getting the Strahler stream order for all
              stream reaches (using the GRASS r.stream.order addon).
              Then I display the streams with line width determined by
              the stream order. Looks pretty nice :-)<br>
              <shameless plug><br>
              <a moz-do-not-send="true"
                href="http://www.surfaces.co.il/strahler-stream-order-in-grass/"
                target="_blank">http://www.surfaces.co.il/strahler-stream-order-in-grass/</a><br>
              </shameless plug>
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 07/14/2015 11:08 PM, Luca Galuppini wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>Dear all<br>
                                  </div>
                                  i have this idea of rendering a river
                                  network so that each river starts as a
                                  very thin blue line, and the line
                                  width increases little by little as
                                  the river goes.<br>
                                </div>
                                i wouldn't like to modify the original
                                file (eg cutting rivers in pieces and
                                give a different width to each piece)
                                but all rivers are digitized with the
                                right direction so i was wondering if
                                there is an expression to teach qgis
                                what is the start end of a river, and
                                assign a wider line for any given
                                distance, for example:<br>
                              </div>
                              from start to 200m - line width 0.1<br>
                            </div>
                            from 200m to 400m - line width 0.2<br>
                          </div>
                          from 400m and over - line width 0.3<br>
                        </div>
                        i think this is an interesting problem because i
                        cannot find a "from - to" command in qgis
                        expression language, neither i know how to
                        properly exploit the line direction with code,
                        which would come useful in many other ways...<br>
                      </div>
                      any python expert out there can help?<br>
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>
                                    <div>
                                      <div class="gmail_extra"><br>
                                        <br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                  </div>
                </div>
                This mail was received via Mail-SeCure System.<br>
                <br>
                <fieldset></fieldset>
                <br>
                <pre>_______________________________________________
Qgis-user mailing list
<a moz-do-not-send="true" href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
This mail was received via Mail-SeCure System.


</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      This mail was received via Mail-SeCure System.<br>
    </blockquote>
    <br>
  </body>
</html>