I need to assign values to a the cells on the "border" of a raster. The inside and the outside are distinguished by having or not having null values assigned.<div>I also need to keep the other cell values (internals) untouched.</div>
<div>I thought to use a mapcalc expression like the following (knowing the the external cells have value 9999)</div><div><br></div><div>if(A==9999,max(A[1,1],A[1,0],A[1,-1],A[0,-1],A[-1,-1],A[-1,0],A[-1,1],A[0,1]),A)</div>
<div><br></div><div>In this case I'm using max, and I alwasy obtain null values as result, as if nulls (from the cells surrounding the external side of the border) were considered maximum values respect to numeric values (of the internal cells).</div>
<div>I could substiture null values for the external cells with a very low negative value, but I would prefer being able to exlude (or manage somehow) null values in my filter.</div><div>Any suggestion?</div><div><br></div>
<div>giovanni</div>