0

I'm trying to calculate the percent area of a certain land cover type within a 5000m window but my results aren't as expected. I've never used focal statistics before but I'm almost certain the results retrieved are not correct and it has something to do with the raster cell size.

I downloaded a landcover raster from Google Earth Engine and the cell size is 0.000808483755707569 for both X and Y.

In the focal statistics tool I used the following parameters:

Neighborhood: Rectangle

Width: 5000

Height: 5000

Unit Type: Cell

I retrieved the following output:

enter image description here

Is this a correct output?

4
  • Are you using ArcGIS Pro or ArcMap?
    – PolyGeo
    Commented Mar 13, 2021 at 3:51
  • 1
    What type of statistics is it?
    – FelixIP
    Commented Mar 13, 2021 at 4:50
  • I'm using ArcGIS Pro. It is calculating the mean. The raster is also binary, 0 for no land cover type and 1 for land cover type.
    – prime90
    Commented Mar 13, 2021 at 15:48
  • Please use the edit button beneath your question to revise it with any requested clarifications.
    – PolyGeo
    Commented Mar 14, 2021 at 21:44

1 Answer 1

1

As you have stated your raster resolution is 0.000808483755707569 which would be in decimal degrees, so your raster has a coordinate system in WGS84.

You have set your neighbourhood to be 5000 cells by 5000 cells. How big is your raster dataset? Go to the layer properties > Source > Raster Information and look at the number of columns/rows your dataset is composed of. If for example your raster had 1000 columns by 1000 rows then your neighbourhood your are generating your focal statistics is 5 times larger that your dataset, hence nonsense results. You need to a choose a sensible neighbourhood size.

4
  • Ohhh so I should be looking at the Colum/Rows when determining my neighborhood size? My columns/rows are 9189/5137. So by setting the window to 5000x5000 in reality it created a gigantic window size because you are multiplying 5000 by 9189? So if my rows and columns are larger than 5000, how does that work? Thanks for responding!
    – prime90
    Commented Mar 13, 2021 at 17:47
  • well normally your window is just 3 cells by 3 cells... its what ever you need.
    – Hornbydd
    Commented Mar 13, 2021 at 19:56
  • Window width and height are in number of cells. If you want a 5km window you might want to project your data, such as into a UTM project that's based in meters. That way you can say, "25m pixels means my 5km window is 200 pixels wide", or a 200x200 window. Although given how focal statistics works (center pixel surrounded by X pixels on each side) usually windows are in odd numbers, so 3x3, 5x5, etc. Commented Mar 15, 2021 at 17:39
  • Thanks for the comments! I understand how it works now. To create my 5000m window using focal statistics I changed my cell size to 100m and input 50 for the focal window.
    – prime90
    Commented Mar 19, 2021 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.