Skip to content

Why does focal() reduce the rows and columns of my raster?

2 messages · Eddie Smith, Jonathan Greenberg

#
Hi Eddie:

focal windows, because they are centered around a cell, have to know
how to deal with edge pixels.  In the case of a 3x3 window, both the
first/last row and first/last column are "special cases" because the
3x3 window surrounding those pixels runs off of the image.  Focal
analyses have to know how to treat these locations.  Take a look at
the "pad" parameter to understand what focal is doing in these special
cases.

--j
On Fri, Jan 10, 2014 at 4:00 AM, Eddie Smith <eddieatr at gmail.com> wrote: