QGIS plugin for traffic trajectory analysis
Introduction · Getting started · Development · License
FVH-3T (Forum Virium Helsinki - Traffic Trajectory Toolkit) is a QGIS plugin which allows users to analyze trajectory-based traffic data. It is intended to be used with point data sets captured by Lidar and processed to a format from which trajectories can be created.
Important
FVH-3T is still in development!
You must have installed QGIS, version 3.34 or newer (earlier versions might work but are not officially supported. To install the plugin you can download the latest release through this link. Click to download the fvh3t.<version number>.zip file.
You can install the plugin directly from the .zip file:
- Open QGIS and from the top menu click Plugins > Manage and Install Plugins...
- In the dialog click on the Install from ZIP tab on the panel on the left
- Select the .zip file you downloaded previously and click Install Plugin.
You can find the features of the plugin in:
- the plugins toolbar
- the Plugins menu
- most importantly the Processing toolbox (found in Processing > Toolbox > Traffic trajectory toolkit).
You can create a virtual gate or an area layer using the toolbar buttons, to which you digitize new features. These layers can then in turn be used in the processing algorithms with the Lidar point data to calculate information about the trajectories passing through the gates or areas.
Three algorithms are included.
- Two inputs:
- Point layer from which trajectories can be created
- Gate layer
- Creates trajectories from the points
- Calculates their speed inside of the given areas
- Two outputs:
- Line layer for the trajectories
- Polygon layer for the areas with additional calculated data
- Two inputs:
- Point layer from which trajectories can be created
- Area layer
- Creates trajectories from the points
- Calculates whether they pass the given gates
- Two outputs:
- Line layer for the trajectories
- Line layer for the gates with additional calculated data
- Exports the gate layer created by "Count trajectories (gates)" to a JSON file
- Output adheres to this JSON schema from Conveqs
Plugin supports creating trajectories from any point datasets that QGIS imports. Points need attributes at least for timestamp, trajetory ID and vehicle classification.
Following sample dataset is available: https://github.com/GispoCoding/FVH-3T/releases/tag/data_sample
Full "Helsinki Esplanadi roadside lidar data capture pilot"-dataset is available from Flow Analytics AGC portal https://flow-portal.com/ Three fixed roadside lidars captured the traffic over 6 month perioid March - August 2024. More information from Forum Virium Helsinki Smart mobility team.
Create a virtual environment activate it and install needed dependencies with the following commands:
python create_qgis_venv.py
.venv\Scripts\activate # On Linux and macOS run `source .venv\bin\activate`
pip install -r requirements-dev.txt
For more detailed development instructions see development.
A symbolic link / directory junction should be made to the directory containing the installed plugins pointing to the dev plugin package.
On Windows Command promt
mklink /J %AppData%\QGIS\QGIS3\profiles\default\python\plugins\fvh3t .\fvh3t
On Windows PowerShell
New-Item -ItemType SymbolicLink -Path ${env:APPDATA}\QGIS\QGIS3\profiles\default\python\plugins\fvh3t -Value ${pwd}\fvh3t
On Linux
ln -s fvh3t/ ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/fvh3t
After that you should be able to enable the plugin in the QGIS Plugin Manager.
On VS Code use the workspace fvh3t.code-workspace. The workspace contains all the settings and extensions needed for development.
Select the Python interpreter with Command Palette (Ctrl+Shift+P). Select Python: Select Interpreter
and choose
the one with the path .venv\Scripts\python.exe
.
This plugin is distributed under the terms of the GNU General Public License, version 2 license.
See LICENSE for more information.