<div>Hi Stephen, may be you can share some picture?</div>
<div> </div>
<div>bests</div>
<div> </div>
<div>milton<br><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">This does not quite work for my purposes.  The problem is the the 0<br>values are in a 2 or 3 grid wide seam in between patched raster maps,<br>
so the value is lower than it should be using<br><br>r.mapcalc &quot;benning_dem=if(patch_benning==0,<br>(patch_benning[-1,-1]+patch_benning[1,-1]+patch_benning[-1,0]+<br>patch_benning[1,0]+patch_benning[-1,1]+patch_benning[1,1])/6,<br>
patch_benning)&quot;<br><br>any thoughts,<br><font color="#888888"><br>Stephen Sefick<br></font>
<div>
<div></div>
<div class="h5"><br>On Fri, Aug 28, 2009 at 12:08 PM, Milton Cezar<br>Ribeiro&lt;<a href="mailto:miltinho.astronauta@gmail.com">miltinho.astronauta@gmail.com</a>&gt; wrote:<br>&gt; Hi stephen,<br>&gt;<br>&gt; just to remember not include yourmap[0,0]<br>
&gt; bests<br>&gt; milton<br>&gt; 2009/8/28 stephen sefick &lt;<a href="mailto:ssefick@gmail.com">ssefick@gmail.com</a>&gt;<br>&gt;&gt;<br>&gt;&gt; I think so- let me try it<br>&gt;&gt;<br>&gt;&gt; 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;<br>
&gt;&gt; wrote:<br>&gt;&gt; &gt; r.mapcalc &quot;newmap = if ( yourmap==0 , ( sum( yourmap[-1,1] ,<br>&gt;&gt; &gt; yourmap[0,1] , ...)/8 ) , yourmap)&quot;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; is that what you mean?<br>&gt;&gt; &gt;<br>
&gt;&gt; &gt; stephen sefick schrieb:<br>&gt;&gt; &gt;&gt; if(0, (sum([-1,1], [0, 1], [1,1], [-1,0], [0,0], [1,0],[-1,-1],<br>&gt;&gt; &gt;&gt; [0,-1],[1,-1])/8))<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; I want to use mapcalc to do the above.  I am missing a syntax step.<br>
&gt;&gt; &gt;&gt; if a value is zero take the average of the eight nearest neighbors and<br>&gt;&gt; &gt;&gt; replace the value with this.  Otherwise, keep the value unchanged<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;<br>&gt;&gt;<br>
&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; Stephen Sefick<br>&gt;&gt;<br>&gt;&gt; Let&#39;s not spend our time and resources thinking about things that are<br>&gt;&gt; so little or so large that all they really do for us is puff us up and<br>
&gt;&gt; make us feel like gods.  We are mammals, and have not exhausted the<br>&gt;&gt; annoying little problems of being mammals.<br>&gt;&gt;<br>&gt;&gt;                                                                -K. Mullis<br>
&gt;&gt; _______________________________________________<br>&gt;&gt; grass-user mailing list<br>&gt;&gt; <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
&gt;<br>&gt;<br><br><br><br></div></div>--<br>
<div>
<div></div>
<div class="h5">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></div></div></blockquote></div><br>