Today’s post is a follow-up of Movement data in GIS #3: visualizing massive trajectory datasets. In that post, I summarized a concept for trajectory generalization. Now, I have published the scripts and sample data in my QGIS-Processing-tools repository on Github.
To add the trajectory generalization scripts to your Processing toolbox, you can use the Add scripts from files tool:
It is worth noting, that Add scripts from files fails to correctly import potential help files for the scripts but that’s not an issue this time around, since I haven’t gotten around to actually write help files yet.
The scripts are used in the following order:
- Extract characteristic trajectory points
- Group points in space
- Compute flows between cells from trajectories
The sample project contains input data, as well as output layers of the individual tools. The only required input is a layer of trajectories, where trajectories have to be LINESTRINGM (note the M!) features:
In Extract characteristic trajectory points, distance parameters are specified in meters, stop duration in seconds, and angles in degrees. The characteristic points contain start and end locations, as well as turns and stop locations:
The characteristic points are then clustered. In this tool, the distance has to be specified in layer units, which are degrees in case of the sample data.
Finally, we can compute flows between cells defined by these clusters:
If you use these tools on your own data, I’d be happy so see what you come up with!
- Movement data in GIS: issues & ideas
- Movement data in GIS #2: visualizing individual trajectories
- Movement data in GIS #3: visualizing massive trajectory datasets
- Movement data in GIS #4: variations over time
- Movement data in GIS #5: current research topics
- Movement data in GIS #6: updates from AGILE2017
- Movement data in GIS #7: animated trajectories with TimeManager
- Movement data in GIS #8: edge bundling for flow maps