Shortest line between features — Tool (QGIS)

In QGIS: Processing Toolbox › Vector analysis › Shortest line between features (native:shortestline).

Realises:

Settings that matter

  • Method: Distance to Nearest Point on feature or Distance to Feature Centroid.
  • Maximum number of neighbors (1 = the nearest only) and Maximum distance.

Watch out

  • The line’s length is the gap between the two features’ edges. If the features are buffered clusters, the real gap between the original patches is longer.

Checked in QGIS 4.2.2, October 2026. Names and options can differ in other versions.