# Questions tagged [focal-statistics]

Focal Statistics (Spatial Analyst), calculates for each input cell location a statistic of the values within a specified neighbourhood around it.

23 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
907 views

### Circular focal means with raster and NAs

I am trying to understand circular focal means using rasters having NA values. I made a couple of scenarios to better understand how to combine weight matrices and functions to summarize values. I am ...
605 views

### Fill gaps in a categorical image with neighbors values in GEE

I'm reclassifying a DEM asset into 6 categories. However, there are some pixels that don't meet my criteria and are null. I would like to find a way to fill these gaps depending on its area and its ...
145 views

### Seeking global projection suitable for raster preserving equal area

I have a global tif file in epsg:4326 and a shapefile of points distributed around the global. I want to retrieve the sum of the value of pixels around 10km of each point. One obvious thing to do is ...
1 vote
121 views

### Creating custom statistic type for use in focal statistics in ArcGIS Pro

I am trying to analyze raster data using a moving window. I am doing this in ArcGIS Pro, but at this point I'm getting stuck on how to use the formula I need as the statistic type of the moving window....
1 vote
81 views

### Calculate auto covariant term using focal function from raster package

I want to calculate the auto covariant by myself. At this point I found the function focal from raster package. Here I show I proceeded : glm_BEF_AUTO <- glm(as.formula (MODEL_FORM) ,family = ...
1 vote
290 views

### How to supply a weight matrix to focal_hpc in R

I'm using the function focal_hpc from spatial.tools in R to compute for each cell of a raster the average value (mean function) around windows of a specific size (3 cells x 3 cells). I used to perform ...
1 vote
142 views

### Defining neighborhood settings in Focal Statistics with Calculate Value using ModelBuilder

I am using ArcGIS Desktop 10.6 with Spatial Analyst. I use ModelBuilder, and I created a model with focal statistic. There are 2 different workflows now. calculate the radius value: This value ...
1 vote
80 views

### Focal regression 3x3 group of cells

I have two raster with same resolution and dimension: water-occurrence index and rainfall (mm). I want to create a new raster of SLOPE (a) and INTERCEPT (b) by performing linear regression between ...
1 vote
149 views

### Saving focal statistics in memory using ArcPy?

I'm currently working on a project where I have written a script that is suppose to do several things. one of these is creating a "quick" focal statistics, from which I extract the values to some ...
1 vote
63 views

### Focal statistics using geodesic distance in ArcGIS Desktop?

I need to compute focal statistics (sum, mean etc.) for raster data spanning the whole globe. I want to use a constant radius e.g. 100km around each cell. However the data are geographic (WGS84), so ...
1 vote
230 views

### Change map unit for focal statistics

I have around 1000 GPS Points and want to calculate the average value of Night lights, within a 10 km radius in ArcGis. My first approach was to do this with buffers, but a lot of polygons overlap and ...
1 vote
228 views

### ArcGIS Focal Statistics Circular Radius Bug Work-Around

I am attempting to run focal statistics on a Raster with a circular neighborhood of 3 cells (600m radius), using the statistics type "maximum". Focal statistics calculates a seemingly nonsensical ...
1 vote
297 views

### Performing neighborhood analysis?

I have a point map of trees along with their size (diameter) as an attribute and I want to create a raster that with the output of a neighborhood analysis . Basically for every point in a raster of ...
1 vote
262 views

### How can I replicate focalmean with focal statistics

I am trying to get rid of some small gaps of no data in my rasters. I would previously have used focalmean but it is no longer available. I've tried what I expected to work but I'm getting errors. ...
37 views

### Calculating statistic for pixels within specified neighborhood in R

I have a raster with coded values of either 0 or 1. For each pixel, I want to calculate the percentage of 1s within a 500m radius. Using the focal() function in the terra package seems to be my best ...
43 views

### ArcPy calculating statistic for pixels within specified neighborhood

I'm using ArcGIS Pro and I need to calculate the proportion of pixels within 500m for a specified value. I have a raster with coded values of either 0 or 1. For each pixel, I want to calculate the ...
222 views

### Spatial Cross Correlation between two rasters

I have two raster data land cover and carbon monoxide, and I wish to perform correlation analysis on the two datasets. I found an article online describing the method using RStudio. I have followed ...
41 views

### Finding the minimum value cells orthogonally to a polyline

I have a raster (rast) and polyline (poly) as shown below with the corresponding data. For all the cells that line passes through, I want to find the minimum value among the cells that are located on ...
80 views

### How to increase the number of the adjacent cells of a focal cell?

I want to recover the adjacent cells around a focal cell, I could do it by using the function adjacent form the package « raster », cells_adj <- adjacent(Habitat[], cells=cells_xy, directions=...
137 views

### Writing massive kernel files for focal statistics in ArcGIS Desktop

I would like to run focal statistics on a raster and apply a weighted kernel file. The issue is that I have a dense raster (and I would like to keep it this way for a reason) on the other hand I am ...
373 views

### raster::focal fails on a selection of invalid row in R

I try to compute the proportion of 0 in an area of 30km around a given pixel. The raster has a resolution of 100m and it is the map of France. For this, I use the function focal() of the raster ...