<div>Hi stephen, </div>
<div> </div>
<div>just to remember not include yourmap[0,0]<br></div>
<div>bests</div>
<div>milton<br></div>
<div class="gmail_quote">2009/8/28 stephen sefick <span dir="ltr">&lt;<a href="mailto:ssefick@gmail.com">ssefick@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I think so- let me try it<br>
<div class="im"><br>On Fri, Aug 28, 2009 at 12:04 PM, achim&lt;<a href="mailto:ak7@jupiter.uni-freiburg.de">ak7@jupiter.uni-freiburg.de</a>&gt; wrote:<br>&gt; r.mapcalc &quot;newmap = if ( yourmap==0 , ( sum( yourmap[-1,1] ,<br>
&gt; yourmap[0,1] , ...)/8 ) , yourmap)&quot;<br>&gt;<br>&gt; is that what you mean?<br>&gt;<br>&gt; stephen sefick schrieb:<br>&gt;&gt; if(0, (sum([-1,1], [0, 1], [1,1], [-1,0], [0,0], [1,0],[-1,-1],<br>&gt;&gt; [0,-1],[1,-1])/8))<br>
&gt;&gt;<br>&gt;&gt; I want to use mapcalc to do the above.  I am missing a syntax step.<br>&gt;&gt; if a value is zero take the average of the eight nearest neighbors and<br>&gt;&gt; replace the value with this.  Otherwise, keep the value unchanged<br>
&gt;&gt;<br>&gt;<br><br><br><br></div>
<div class="im">--<br>Stephen Sefick<br><br>Let&#39;s not spend our time and resources thinking about things that are<br>so little or so large that all they really do for us is puff us up and<br>make us feel like gods.  We are mammals, and have not exhausted the<br>
annoying little problems of being mammals.<br><br>                                                               -K. Mullis<br>_______________________________________________<br></div>
<div>
<div></div>
<div class="h5">grass-user mailing list<br><a href="mailto:grass-user@lists.osgeo.org">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>
</div></div></blockquote></div><br>