<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 14, 2013 at 1:42 PM, Luís Miguel Royo Pérez <span dir="ltr"><<a href="mailto:luis.miguel.royo@gmail.com" target="_blank">luis.miguel.royo@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Of course!<br>
<br>
here is the command I'm using:<br>
<br>
<blockquote>r.neighbors --overwrite 
input=celdas.aleatorias.1-250@PERMANENT output=media1-250.pesos0 
weight=/home/luismi/Escritorio/prueba_pesos0.txt<br>
  <br>
</blockquote>
And the Matrix Weight is the next:<br>
<br>
<blockquote>0 0 0<br>
0 0 0<br>
0 0 0 <br>
</blockquote>
This matrix is the same for 1, 5 and 10 values. I'm putting spaces between the numbers... is this correct?<br></div><div class="gmail_extra"><div><div class="h5"><br><br></div></div></div></blockquote><div>Spaces between numbers are OK (and newline for rows). You may want to try the analyze test map created by r.mapcalc:</div>

<div><div><br></div><div>r.mapcalc expression="a_test = row()  - 1 + col() - 1"</div></div><div><br></div><div>0 1 2</div><div>1 2 3</div><div>2 3 4</div><div><br></div><div>r.neighbors input=a_test@PERMANENT output=a_neig method=sum weight=...<br>

</div><div><br></div><div>some weights:</div><div><div>1 10 1</div><div>10 1 1</div><div>1 1 1</div></div><div> </div><div>method was sum (easy to count by hand), so result:</div><div><br></div><div>4 9 24</div><div>9 36 63</div>

<div>24 63 90</div><div><br></div><div>The center cell is</div><div>1*0 + 10*1 + 1*2 + 10*1 + 1*2 + 1*3 + 1*2 + 1*3 + 1*4  = 36</div><div><br></div><div>You are right, some example like this should be in the manual.</div>

<div><br></div><div>Zero weight really creates NULLs which is strange, I would expect zeros, maybe bug.</div><div><br></div><div>Hope that helps, if not hopefully others can say something about it.</div><div><br></div><div>

Vaclav</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div>
<div class="h5">
<div class="gmail_quote">2013/11/14 Vaclav Petras <span dir="ltr"><<a href="mailto:wenzeslaus@gmail.com" target="_blank">wenzeslaus@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">

<div><div>On Thu, Nov 14, 2013 at 12:45 PM, Luis Miguel Royo Perez <span dir="ltr"><<a href="mailto:luis.miguel.royo@gmail.com" target="_blank">luis.miguel.royo@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi everyone,<br>
    <br>
    I hope someone can explain how works the option <i>"matrix weights"
    </i>of the <b>r.neighbors</b> program. I've been trying to find out
    for myself but I'm really confused. I've read the documentation but
    it's no clear for me in this aspect.<br>
    <br>
    What I've trying to do to find out how works it the next:<br>
    <br>
    1st I've created a random matrix 5x5 with values from 1-25 randomly
    disposed.<br>
    2nd I've done four different matrix, 0, 1, 5, 10, for all the values
    in a 3x3 window, <br>
    <blockquote>for the first one (0), all the values are NULL.<br>
      for the rest I have the same result... :S Why?<br>
    </blockquote>
    I know i'm missing something, but I don't know what is it. I would
    aprecciate some help in this point. <br>
    <br></div></blockquote></div></div><div>Hi, can you please post also the exact commands you are using to make it clear? (I mean just copy from it command line or using Copy button in module dialog.)</div><div><br></div>


<div>Thanks,</div>

<div>Vaclav</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div bgcolor="#FFFFFF" text="#000000">


    Thank you very much!!<span><font color="#888888"><br>
    <br>
    <pre cols="72">-- 
Luís Miguel Royo Pérez
</pre>
  </font></span></div>

<br></div>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class=""><font color="#888888">-- <br>Luís Miguel Royo Pérez. <br>Licenciado en Historia <br>Arqueólogo colegiado Nº 16218<br><br>Av. Blasco Ibañez nº 1. Manises (Valencia)<br>

Teléfonos 679846103 y 961545792<br>
email: <a href="mailto:luis.miguel.royo@gmail.com" target="_blank">luis.miguel.royo@gmail.com</a><br>web: <a href="http://www.inisig.com" target="_blank">www.inisig.com</a><br><br>
</font></span></div>
</blockquote></div><br></div></div>