Short Path

Find shortest path between points based on line (network) layer.
Using Dijkstra's algorithm

GITHUB REPO
Image

Python

This plugin is built with QGIS's plugin builder 3. It is mainly written with python, using PYQGIS library which is very powerful library. It has very intuitive GUI and is well documented. PYQGIS library also has good and wide organised documentation.

Image

Inspiration

To build this plugin was inspired by water pipeline maintenence process. The logic is to add three layers to the project: 1) Network (pipeline) layer; 2) Logger (sensor) layer; 3) Leak (damage) layer; System looks at Leak layer's attribute table, finds logger_id and based on the network layer's geography it creates new memory layer with same attributes as network layer. Also, system adds full length column.

Image

Logger

Logger layer is a point layer which shows sensors locations on the map. It's important to maintain the structure of attributes of this layer as it's used for connection finding logic. First four attributes and their order are mandatory for this layer. After these four attributes, you can add as many columns as you need.

Image

Leak

Leak layer is a point layer which shows damaged points of pipeline. It's important to maintain the structure of attributes of this layer as it's used for connection finding logic. First five attributes and their order are mandatory for this layer. After these five attributes, you can add as many columns as you need.

Image

Network

Network (pipeline) layer is a line layer used for path generation between points. It can include any attributes which will be copied by plugin to the newly generated, shortest path layers.

Image

Menu

Plugin menu shows three layers dropdown list with layer name and crs. It allows you to check logical connection generation checkbow which adds direct (logical) connections between points. Download test layers package here: test_net.zip

Background

Image by PublicDomainPictures from Pixabay
Image by M. H. from Pixabay

Keep in touch

Please, message us if you have any thoughts.

humanovirtual

I'm mapping and scripting enthusiast. This is my first QGIS plugin but if you have any idea or needs to built new plugin, we can discuss details. Somtimes people can't imagine how wide is automation capabilities. So, never stop imagination and always ask "is it possible to..."
You can find me on reddit and see my r/SLRep there.

Email: rewaza@gmail.com