Regression Methods for Geospatial DataPart 1 of 4Introductory · Updated December 1, 2026
Nearest-Neighbour Regression
Measurements of a field are often available only at scattered points, and the value is needed somewhere else. Nearest-neighbour regression estimates it by averaging the observations near the query point. Every method later in this series refines this estimator rather than replacing it.
The estimate is the mean of the nearby observations
Given observations and a query point , define a neighbourhood and average over it:
The estimator assumes no functional form for the field (it is non-parametric). Its only assumption is that the field varies slowly enough for points near to carry information about the value at . Everything therefore depends on how “near” is defined.
Per-axis length scales define the distance
In a geospatial problem the axes are not commensurable. An observation made along a flight track has a latitude, a longitude, a time and a flight level:
Measuring the distance between two such points requires stating how many minutes, and how many feet of altitude, are equivalent to a kilometre. The units do not answer this; the choice is a model of the field’s correlation structure. The standard approach gives each axis its own length scale and divides by it before taking the norm:
where is the great-circle distance. Each term is dimensionless: a separation in units of the distance along that axis over which the field changes appreciably. The neighbourhood is everything within a cutoff :
Giving each input dimension its own scale is known in machine learning as automatic relevance determination. If a fitted length scale grows without bound, every point is close along that axis, so the axis no longer affects which points are neighbours; a length scale that runs to the top of its search range suggests that the axis carries little signal.
Wide, thin layers give a disc-shaped neighbourhood
With the neighbourhood is a sphere. Ice-supersaturated regions, where persistent contrails form, are layered: tens to hundreds of kilometres wide but only a few hundred feet deep. The neighbourhood that matches them is a flat disc (Figure 1).
A flight level is 100 ft, so FL is 1,000 ft, or 0.305 km. With km,
With these scales and a cutoff , an aircraft 100 km away at the same altitude and time is a neighbour (), while one directly overhead and 10,000 ft higher is not (), the opposite of what geographic distance alone would give.
A fixed radius or a fixed number of neighbours
The neighbourhood can be defined in two ways, which fail differently.
- Fixed : take the closest points at any distance. The neighbourhood is never empty, but in a sparse region the closest observations may be hundreds of kilometres away, and the estimate is then built from points that carry little information about the query.
- Fixed radius : take every point within the cutoff. In a sparse region the neighbourhood is empty, a condition that can be detected and handled explicitly, although the estimator then needs a fallback value, which the next tutorial provides.
Scanning all observations for every query costs per query. A ball tree reduces this: it recursively partitions the points into nested hyperspheres, and at query time discards any ball whose closest possible point is beyond the cutoff. For geospatial data the tree is usually built on latitude and longitude in radians under the haversine metric and used as a geographic pre-filter; the time and flight-level conditions are then applied to the much smaller set of candidates. The pre-filter must return a superset of the true neighbourhood, or the tree drops points the metric would have kept.
Assumptions and failure modes
controls smoothing, with the usual bias–variance trade-off. A small gives few neighbours and an estimate that follows local structure but varies with the noise in a handful of points. A large gives a stable estimate that averages away the structure of interest.
Within every observation has the same weight: a measurement 1 km away and one at contribute equally, and one just beyond the cutoff contributes nothing. The estimate is therefore a step function of the data; small changes in or in the query position move neighbours in or out and make jump. Physical fields do not change discontinuously at the cutoff distance, so the influence of an observation should decrease smoothly with distance.
Summary
- Nearest-neighbour regression averages the observations within a neighbourhood of the query.
- On mixed axes the distance metric, set by one length scale per axis, is the main modelling choice; for atmospheric layers the neighbourhood is much wider than it is deep.
- A fixed radius makes sparse regions detectable as empty neighbourhoods; a fixed hides them.
- Equal weights inside a hard boundary make the estimate discontinuous.
Kernel Regression replaces the hard boundary with a smooth weight; nearest-neighbour regression is its special case with a rectangular kernel.
References
- Cover, T. M., & Hart, P. E. (1967). Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964
- Stone, C. J. (1977). Consistent nonparametric regression. The Annals of Statistics, 5(4), 595–620. doi:10.1214/aos/1176343886
- Uhlmann, J. K. (1991). Satisfying general proximity/similarity queries with metric trees. Information Processing Letters, 40(4), 175–179. doi:10.1016/0020-0190(91)90074-R
- Rasmussen, C. E., & Williams, C. K. I. (2006). Gaussian Processes for Machine Learning. MIT Press. doi:10.7551/mitpress/3206.001.0001 (Chapter 5 covers automatic relevance determination.)