<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"><<a href="mailto:ssefick@gmail.com">ssefick@gmail.com</a>></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 "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)"<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<<a href="mailto:miltinho.astronauta@gmail.com">miltinho.astronauta@gmail.com</a>> wrote:<br>> Hi stephen,<br>><br>> just to remember not include yourmap[0,0]<br>
> bests<br>> milton<br>> 2009/8/28 stephen sefick <<a href="mailto:ssefick@gmail.com">ssefick@gmail.com</a>><br>>><br>>> I think so- let me try it<br>>><br>>> On Fri, Aug 28, 2009 at 12:04 PM, achim<<a href="mailto:ak7@jupiter.uni-freiburg.de">ak7@jupiter.uni-freiburg.de</a>><br>
>> wrote:<br>>> > r.mapcalc "newmap = if ( yourmap==0 , ( sum( yourmap[-1,1] ,<br>>> > yourmap[0,1] , ...)/8 ) , yourmap)"<br>>> ><br>>> > is that what you mean?<br>>> ><br>
>> > stephen sefick schrieb:<br>>> >> if(0, (sum([-1,1], [0, 1], [1,1], [-1,0], [0,0], [1,0],[-1,-1],<br>>> >> [0,-1],[1,-1])/8))<br>>> >><br>>> >> I want to use mapcalc to do the above. I am missing a syntax step.<br>
>> >> if a value is zero take the average of the eight nearest neighbors and<br>>> >> replace the value with this. Otherwise, keep the value unchanged<br>>> >><br>>> ><br>>><br>
>><br>>><br>>> --<br>>> Stephen Sefick<br>>><br>>> Let'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>>> 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>
><br>><br><br><br><br></div></div>--<br>
<div>
<div></div>
<div class="h5">Stephen Sefick<br><br>Let'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>