Aerial imagery captures extraordinary detail, from the boundaries between agricultural fields to the narrow lines of roads and irrigation channels. Yet the patterns that matter can be difficult to discern when fine textures compete with larger landscape structures. Raster convolution provides a familiar, flexible way to emphasize those patterns with neighborhood filters.
With ArcGIS GeoAnalytics Engine 2.2, the new RT_Convolution function brings this capability directly to raster columns in Apache Spark DataFrames. You can apply predefined or custom kernels and combine the results with other GeoAnalytics Engine raster functions and analysis tools, without moving data into a separate image-processing workflow. In this post, we use aerial imagery to explore how convolution can reveal spatial structure and texture in raster data.
Convolution, in plain language
Convolution considers each pixel together with its neighbors and calculates a new value using a small set of weights called a kernel. Think of the kernel as a small window that moves across the image. Its pattern of weights determines which characteristics the filter emphasizes.
One kernel might emphasize abrupt changes between neighboring pixels, making boundaries easier to see. Another might average neighboring values to smooth small variations. Change the kernel, and you change what becomes prominent in the image.
The operation is intentionally local and interpretable: the output value at each location reflects the kernel and the surrounding pixels. That makes convolution useful both for exploring raster structure and for preparing data for additional analysis. Let’s take a look at how this works.
Meet the landscape
For this analysis, we use aerial imagery from the USDA National Agriculture Imagery Program (NAIP), which collects high-resolution imagery across the continental United States during agricultural growing seasons. Specifically, we use the 2023 Kansas NAIP natural-color imagery published by the Kansas Data Access and Support Center (DASC). The imagery has a spatial resolution of 30 cm. It is available as an Image Service and can be loaded into a Spark DataFrame for raster processing with GeoAnalytics Engine, so we can work with only the area of interest rather than downloading the full statewide dataset.
For this demonstration, we selected an 8-by-8-mile agricultural area near Garden City in Finney County, Kansas. This part of the High Plains is farmed intensively, and much of the cropland is irrigated. The scene contains a recognizable mix of circular center-pivot irrigation systems, rectangular agricultural parcels, roads, and waterways, which makes it a good test case for revealing both straight and curved boundaries.
Two spatial pattens are immediately visible: straight boundaries created by roads and field divisions, and circular patterns produced by center-pivot irrigation. At the same time, color and texture within the fields can make those structures harder to compare across a large scene.
Where are the boundaries?
The goal in this example is to highlight agricultural field boundaries, particularly the circular patterns created by center-pivot irrigation.
Because convolution operates on a neighborhood of pixels, image resolution determines the geographic area covered by a kernel. For example, a 3 x 3 kernel applied to the original 30 cm imagery covers only a 0.9 x 0.9 m neighborhood, which is too small to capture broader field-scale patterns effectively. To emphasize field boundaries rather than fine details such as crop rows, we resampled the loaded image tiles to 10 m. The same 3 x 3 kernel then covers a 30 x 30 m neighborhood, reducing fine-scale pattern while highlighting field-scale structure. Choosing an appropriate pixel size is essential for matching the kernel’s neighborhood scale to the features you want to analyze.
Let’s start by applying several kernels to highlight different aspects of the spatial structure in the landscape.
Sometimes we want the landscape to remain recognizable while changing the prominence of local detail. Sharpening and smoothing change how much local detail stands out in the same scene. The sharpen kernel increases contrast where neighboring pixels differ. The smooth kernel averages neighboring pixel values, softening abrupt transitions and reducing small patches of light and dark within fields. This can make the broad circular and rectangular patterns easier to follow.
A directional gradient kernel measures how quickly pixel values change along a selected direction. Strong responses appear where brightness changes sharply across that direction, while relatively uniform areas remain dark. In the east- and west-facing outputs, vertical and curved field boundaries are especially prominent because their brightness transitions have a strong horizontal component. The north- and south-facing outputs respond more strongly to horizontal boundaries. Opposing directions reveal similar structures but can differ in the output of a filter depending on whether pixel values increase or decrease in the direction represented by the kernel.
Directional line-detection kernels respond to narrow linear patterns and edge segments aligned with the kernel’s orientation. The horizontal output makes east-west field divisions and roads more visible. The vertical output emphasizes north-south boundaries and vertical portions.
Comparing the two outputs helps separate structures that overlap in the original imagery. A road or field edge that appears subtle in one output may become much clearer in the other because its local orientation aligns with the selected filter.
Interpret the response, not a feature label.
The gradient and line-detection kernels highlight local structure that matches its directional pattern. The kernel does not determine whether the structure is a road, canal, field boundary, or another feature. That interpretation must still come from context or a later analytical step.
From convolution to spatial structure
Where does the NAIP image produce a strong convolution response that might correspond to the edges of center-pivot irrigation circles or fields? Rather than stopping with an enhanced image, we use convolution as part of a workflow to create a binary raster that flags candidate pixels for visual review.
To distinguish prominent field boundaries from weaker local variation, we apply a percentile-based threshold to the Laplacian response. A fixed threshold can be sensitive to differences in image brightness and contrast, so we instead derive the threshold from the output raster’s pixel-value distribution. Specifically, we select pixels with Laplacian responses below the 10th percentile, retaining the strongest negative responses as candidate boundary locations. This approach balances the emphasis of meaningful field structures against the suppression of weaker responses caused by within-field texture. We then overlay the candidate boundaries on the original imagery to assess how closely they correspond to circular irrigation patterns and field edges.
Bring convolution into distributed spatial analysis
The convolution shown here are familiar image-processing operations. What is new in GeoAnalytics Engine 2.2 is the ability to incorporate them directly into a distributed Spark-based workflow. RT_Convolution applies a kernel to each raster band and includes predefined kernels for common operations such as smoothing, sharpening, edge detection, and directional line detection.
For specialized workflows, you can define a custom kernel with your own dimensions and weights. Convolution can therefore serve as a composable step in the same workflow used to prepare, analyze, and combine large raster and vector datasets.
This new function brings a familiar image-processing building block into the environment where GeoAnalytics Engine users already work: raster data in Spark DataFrames, combined with other large-scale spatial operations.
The agricultural example presented here is only one possibility. You can apply the same technique to:
- highlight roads and linear infrastructure
- enhance building or parcel-like boundaries
- detect directional terrain or image texture
- smooth noisy raster measurements before downstream analysis
- prepare imagery for additional analytical or machine-learning workflows
The key idea is simple: changing how we examine neighboring pixels can reveal structures that were already present.
| What do you want to do? | Filter to try | What to expect |
| Find boundaries | Gradient, Sobel, or Laplacian | Strong response where neighboring pixels change. |
| Find directional linear patterns | Line detection | Structures aligned with the selected direction become more prominent. |
| Increase visible detail | Sharpen | Local contrast and fine boundaries become more pronounced. |
| Reduce small-scale variation | Smooth | Fine texture and noise recede while broader patterns remain. |
| Build a specialized operation | Custom kernel | A neighborhood calculation tailored to the workflow. |
Convolution and machine learning solve different problems
Convolution can emphasize spatial structure, reduce noise, enhance boundaries, or prepare imagery for another analytical step. However, if you need to identify what a feature is, a trained classification or object-detection model may be more appropriate.
Convolution is a lightweight, interpretable building block rather than a substitute for semantic detection. The kernel explicitly defines the neighborhood operation, and you can review its output directly against the source raster.
See the structure that was already there
In the source aerial image, circles, rectangles, roads, and field boundaries are already present. Convolution changes which structures dominate our view. A gradient brings selected edges forward. A line-detection filter emphasizes orientation. Sharpening preserves context while increasing local contrast, and smoothing suppresses fine variation so that broader geometry stands out.
With RT_Convolution in ArcGIS GeoAnalytics Engine 2.2, you can incorporate these operations directly into scalable, Spark-based raster workflows. Sometimes, changing how we examine neighboring pixels is enough to reveal a useful pattern and create a stronger input for the next analytical step.
Article Discussion: