mirror values at edges

Lars Schylberg larss at fmi.kth.se
Sat Oct 31 03:10:39 EST 1992


This is a reply to my own question.  After a good nights sleep it was all 
obvious to me. 

r.mapcalc << EOF
neigh.mirror=eval( t1 = if( $CLUM != $CLUM[0,1], $CLUM[0,1], 0), \\
                   t2 = if( $CLUM != $CLUM[1,0], $CLUM[1,0], 0), \\
                   t3 = if( $CLUM != $CLUM[0,-1], $CLUM[0,-1], 0), \\
                   t4 = if( $CLUM != $CLUM[-1,0], $CLUM[-1,0], 0), \\
                   max( t1, t2, t3, t4 ))
EOF
--------

Lars

Lars Schylberg                    Email: larss at fmi.kth.se  
Department of Photogrammetry 
Royal Institute of Technology     Tel.   +46 8 790 86 33   
S-100 44  STOCKHOLM, SWEDEN       Fax.   +46 8 790 66 10







More information about the grass-dev mailing list