Plugin icon

Nearest with greater value

Plugin ID: 2769

Get name (or ID) of and distance to the nearest feature with greater value in a certain field of a point layer.
Returns point layer with added attributes and a line layer with connecting lines.

(1) votes 
Download latest
Versions JSON
Latest version

For each feature on a vector layer, get name (or ID) of and distance to the nearest neighbour with greater value in a certain field. On line or polygon layers, distance is calculated between the center points of the bounding boxes. Since version 2.0, distance is calculated on the WGS84 ellipsoid (not on the layer plane) by default.
The main output is a layer with added attributes neargtdist (distance), neargtdelta (difference in value), neargtname (name or ID), neargtcount. Note that the features are sorted from lowest to greatest value of the field that was used to compare values.
The field neargtcount gives the value of incoming connecting lines linking to points with smaller value.
Also returns a lines layer with connecting lines, as well as basic statistics of the distances and deltas (min, max, mean, quantiles).
Use cases: Which is the next larger city? How far is the next higher building? Which is the closest peak with higher elevation?
Useful for spatial analysis or to categorize features in order to apply different styles (e.g. major and minor summits).

2.3
0.3
Version QGIS >= QGIS <= Date
2.3 - 3.18.0 4.99.0 145 riannek 2026-06-16T16:40:58.055097+00:00
2.2 - 3.18.0 4.99.0 417 riannek 2026-03-13T17:42:48.907672+00:00
2.1 - 3.18.0 3.99.0 728 riannek 2025-07-06T07:46:21.952963+00:00
2.0 - 3.18.0 3.99.0 1887 riannek 2023-02-03T22:19:42.598685+00:00
1.1 - 3.18.0 3.99.0 410 riannek 2023-01-17T10:15:41.872285+00:00
1.0 - 3.0.0 3.99.0 791 riannek 2022-10-19T06:10:03.578884+00:00
0.3 3.0.0 3.99.0 801 riannek 2022-09-12T12:33:29.424040+00:00
0.1 3.0.0 3.99.0 329 riannek 2022-09-09T14:36:04.874333+00:00