<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=windows-1255"
      http-equiv="Content-Type">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="preferred-charset" text="#660000"
    bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 09/08/2013 21:15, Admin wrote:<br>
    </div>
    <blockquote
cite="mid:!&!AAAAAAAAAAAYAAAAAAAAAG+QzjzdGUNEtmYcS16YDAHCgAAAEAAAAGhjscCP9BhIkXDvt%2FuGrWIBAAAAAA==@shaw.ca"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1255">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \, serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Hi Mitch <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Thanks for your
            prompt response’<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">I have a raster
            that covers the whole area and the grid I am talking about
            is a square polygon as shown in the pic attached. I want
            average slope for each of the polygons<o:p></o:p></span></p>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">(Keeping
          this on the maillist <font color="rgb(102, 0, 0)">insures
            that you'll get the best answers, and helps others along the
            way)</font></font></font></p>
    <p><br>
    </p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">OK, you can
          <font color="rgb(102, 0, 0)">get the average slope for each <font
              color="rgb(102, 0, 0)">polygon "grid" sq<font
                color="rgb(102, 0, 0)">uare as follows:</font></font></font></font></font></p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">Start the
          GRASS Tools plugin, and use the wizard to define a GRASS
          LOCATION with the same co<font color="rgb(102, 0, 0)">ordinate
            system as your DEM raster and polygon lay<font
              color="rgb(102, 0, 0)">ers. </font></font></font></font></p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">Now use the
          GRASS modules r.in.gdal to import the DEM into GRASS, and
          v.in.ogr to import the polygon layer. Once yo<font
            color="rgb(102, 0, 0)">u have these two layers in GRASS, </font>run
          the GRASS module r.slope.aspect on the DEM raster to create a
          slope <font color="rgb(102, 0, 0)">raster</font> from the
          DEM.</font></font></p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">Now use v.<font
            color="rgb(102, 0, 0)"></font>rast.stats to get several
          addition<font color="rgb(102, 0, 0)">al attribute columns into
            your polygon (grid squares) layer with the max<font
              color="rgb(102, 0, 0)">, min, avg, stddev, etc of slope
              from the slope r<font color="rgb(102, 0, 0)">aster.</font></font></font></font></font></p>
    <p><br>
    </p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">If<font
            color="rgb(102, 0, 0)"> necessary, you can export the
            polygon (grid squares) with all the new attribute columns
            back out to a new shapefile with v.out.ogr.</font></font></font></p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif"><br>
        </font></font></p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif">HTH</font></font></p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><font color="rgb(102, 0, 0)"><font face="sans-serif"> </font></font><br>
    </p>
    <blockquote
cite="mid:!&!AAAAAAAAAAAYAAAAAAAAAG+QzjzdGUNEtmYcS16YDAHCgAAAEAAAAGhjscCP9BhIkXDvt%2FuGrWIBAAAAAA==@shaw.ca"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">I hope this
            will make it clear<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Thank you very
            much again<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Moges <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                Micha Silver [<a class="moz-txt-link-freetext" href="mailto:micha@arava.co.il">mailto:micha@arava.co.il</a>] <br>
                <b>Sent:</b> August 9, 2013 11:05 AM<br>
                <b>To:</b> Admin<br>
                <b>Cc:</b> qgis-user<br>
                <b>Subject:</b> Re: [Qgis-user] grid avevarage slope<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">On 08/09/2013 07:31 PM, Admin wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="color:#1F497D">Thanks a lot
              Micha,</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">I  am not
              that efficient in gis. I tried to follow your instruction
              but I  could  not import DEM file to GRASS</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">I am using
              QGIS 1.8.0-Lisboa , installed GRASS plugins but could not
              import DEM data.  </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">To make it
              clear,  I have a basin of about 600 sq km.  my model is
              run on 15 km x 15 km grid. Some part of the grid falls
              outside of the basin boundary apparently. I have 25 grids
              in total and  I am looking for average slope for 25 grids,
              those out of basin are set to 0 anyways.   I   created
              slope map from DEM using raster terrain analysis but to
              grid them into 15x15km and find average slope for each
              grid is my problem</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial","sans-serif"">Sorry,
            but I guess I misunderstood. When you say "25 grids" are
            these 25 tiles that cover the whole basin? or large grid
            cells of 15 km resolution? </span><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial","sans-serif"">Your
            question "grid them into 15x15km ... " makes me think you
            mean square polygons of 15km on each side. Is this your
            situation? So you want to find the average slope in each of
            the 15x15 polygon squares? GOing back to GRASS, there is a
            module "v.rast.stats" that calculates various statistics
            from a raster for each polygon in a polygon vector layer.
            That might be what you need.</span><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial","sans-serif""> </span><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Arial","sans-serif"">Perhaps
            if you could mention what original data you have, then
            someone on the list could offer a specific work flow. Do you
            have an elevation raster? a slope raster? Have you
            delineated the actual basin boundary?</span><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p> </o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">I highly
              appreciate your help</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Thanks</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Moges</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #B5C4DF
              1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                  Micha Silver [<a moz-do-not-send="true"
                    href="mailto:micha@arava.co.il">mailto:micha@arava.co.il</a>]
                  <br>
                  <b>Sent:</b> August 9, 2013 5:31 AM<br>
                  <b>To:</b> Admin<br>
                  <b>Cc:</b> <a moz-do-not-send="true"
                    href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>
                  <b>Subject:</b> Re: [Qgis-user] grid avevarage slope</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <div>
            <p class="MsoNormal">On 08/08/2013 04:57 AM, Admin wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal">Hi all,<o:p></o:p></p>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal">I need your help. I am working on a
              basin. The model I am working with entails average surface
              slope on grid basis. My basin has a number of grids. I
              clipped and tried to get average slope but I am not happy
              with the results.<o:p></o:p></p>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal">Is there anyway I can do it? <o:p></o:p></p>
            <p class="MsoNormal"> <o:p></o:p></p>
          </blockquote>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              , serif","serif"">Using GRASS is one
              approach. If you don't yet have a slope grid, then import
              it into GRASS, and run the GRASS module r.slope aspect on
              your elevation grid. Then clip it to the basin area. Now
              run the r.univar module on the clipped slope grid to get a
              set of univariate statistics from the grid.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              , serif","serif"">If you already have a
              clipped slope grid then import that into GRASS, and try
              the same r.univar to get the stats.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              , serif","serif"">Note that there is also a
              group of GRASS addons for basin analysis: r.stream.*  One
              of the addons is r.stream.stats which gives you lots of
              basin statistics, including two different approaches to
              "average" slope in a watershed.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              , serif","serif""> </span><o:p></o:p></p>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal">Thanks<o:p></o:p></p>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal">Moges<o:p></o:p></p>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;font-family:"Times New
                Roman , serif","serif""><br>
                <br>
                This mail was received via Mail-SeCure System.<br>
                <br>
                <br>
                <br>
                <br>
              </span><o:p></o:p></p>
            <pre>_______________________________________________<o:p></o:p></pre>
            <pre>Qgis-user mailing list<o:p></o:p></pre>
            <pre><a moz-do-not-send="true" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre>
            <pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
            <pre> <o:p></o:p></pre>
            <pre>This mail was received via Mail-SeCure System.<o:p></o:p></pre>
            <pre> <o:p></o:p></pre>
            <pre> <o:p></o:p></pre>
          </blockquote>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              , serif","serif""><br>
              <br>
              <br>
              <br>
            </span><o:p></o:p></p>
          <pre>-- <o:p></o:p></pre>
          <pre>Micha Silver<o:p></o:p></pre>
          <pre>GIS Consultant, Arava Development Co.<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a><o:p></o:p></pre>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman","serif""><br>
              <br>
              This mail was received via Mail-SeCure System.<o:p></o:p></span></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><br>
            <br>
            <br>
            <o:p></o:p></span></p>
        <pre>-- <o:p></o:p></pre>
        <pre>Micha Silver<o:p></o:p></pre>
        <pre>GIS Consultant, Arava Development Co.<o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a><o:p></o:p></pre>
      </div>
      <br>
      <br>
      This mail was received via Mail-SeCure System.<br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
GIS Consulting
052-3665918
<a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a>
</pre>
  </body>
</html>