How to make a Heat Map of Distance between a set of parallel lines in QGIS?

This question is an extension of Question posted on the following link: Distance between multiple parallel lines?

I have a set of parallel lines (as in the image below), I am seeking to find the minimum distance of each line and create a heat map to visualize the distribution of distance between closest neighbors within extent of the layer in the direction of orientation of the lines.

enter image description here

Shapefile of the set of parallel lines is available from the following link: https://drive.google.com/drive/folders/1F8ZF6pZXB6RlqiASJ8m6J1f-LM9yEn4Z?usp=sharing


2 Answers 2

  1. Add additional vertices to your lines using Densify by count.

  2. Extract vertices from the densified line.

  3. Apply heatmap symbol renderer to the extracted vertices.

Screenshot: original lines are extended to see their distance and compare it with the rendered heatmap: enter image description here


You can use the native QGIS Line Density algorithm for this task. It computes a density value based on line segments in a search radius as you can see in the picture.

enter image description here

You find the algorithm in the QGIS processing toolbox in the interpolation algorithm group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.