Resample binary raster to give *proportion* within new cell window
Use Block statistics.
This works like Focal statistics by computing a statistical summary (such as the mean you desired) within a specified neighborhood of cells (such as an 8 by 8 square, where 8 = 240 m / 30 m), except it performs this only for a regular subdivision of the grid, rather than with a set of overlapping neighborhoods, one at each cell.
You can also make use of Focal statistics if you really want to: after computing the focal mean over 8 by 8 squares, resample to a 240 m grid using nearest neighbor resampling. When the grids are registered to one another (i.e., they have the same origin) this should give the same result as block statistics
. (I won't guarantee that: some arbitrary choices have to be made when new cell centers coincide with old cell corners--as they will here--and, if different committees coded the two procedures, they may have made different choices: little in ArcGIS is truly consistent, I'm afraid.)
Another approach is to create a grid of zones, one zone per square where an average is desired, and perform a zonal summary as a grid. The zones can be computed mathematically from grids of row and column coordinates (by means of the floor
or int
function, by reclassification, or by joining a suitable table to the attribute table).
I will close by remarking that bilinear interpolation, although it will indeed yield values in the range 0..1, is not what you want: it works by finding at most four original (30 m) grid cells surrounding the center of a new (240 m) cell and interpolating only their values. As such, it will overlook the other 8*8 - 4 = 60 original cells falling within each new block. I illustrate bilinear interpolation at http://www.quantdec.com/SYSEN597/GTKAV/section9/map_algebra.htm: the discussion begins near the middle of the page.
In ArcGIS whne you resample data using bilinear resampling it only looks at the values of the centre four cells (resample documentation). As such using this method you'll still lose data if you don't compensate for the data loss.
Given that we know that for the resampled cells you're after a proportion of the cells that are forested, we can think of it as the sum of the 30m cells divided by 64 (there are 64 30m cells in the 240m block).
This means that if we can create a new raster with the centre values as the sum of the surrounding values at 30m resolution, lowering the resolution using resample with nearest neighbour or bilinear interpolation will give us 240m cells which are the sum of the 30m cells they cover. We can do this with the focal sum tool over the 30m raster.
Lastly once we have a 240m focal sum raster, divide by 64 to get your proportion answer.
In Idrisi I'm not sure of the image sampling algorithms, likewise in QGIS, but I imagine there's something similar. Certainly in QGIS you can process the raster in Python using scipy ndimage or similar.