# 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.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
934 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 ...
167 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 ...
• 391
67 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
170 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....
• 11
1 vote
84 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 = ...
• 49
1 vote
342 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 ...
• 317
1 vote
186 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 ...
• 91
1 vote
95 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 ...
• 537
1 vote
169 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 ...
• 447
1 vote
242 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
243 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 ...
• 95
1 vote
306 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 ...
• 45
1 vote
265 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. ...
• 1,896
19 views

### How do I get a focus pixel function based on a given buffer containing surrounding pixels?

I want to calculate the percentage of built-up pixels surrounding each built-up pixel within a 100 sq.km. I know focal function in R can be of use. But I want to understand the actual algorithm behind ...
391 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 ...
52 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 ...
• 479
111 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[[1]], cells=cells_xy, directions=...
• 49
174 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 ...
445 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 ...