SkillAgentSearch skills...

PyTrack

a Map-Matching-based Python Toolbox for Vehicle Trajectory Reconstruction

Install / Use

/learn @cosbidev/PyTrack

README

<h1 align="center"> <img src="https://raw.githubusercontent.com/cosbidev/PyTrack/main/logo/pytracklogo.svg" width="300"> </h1><br>

PyTrack: a Map-Matching-based Python Toolbox for Vehicle Trajectory Reconstruction

All platforms PyPI Latest Release Conda Version License docs PyPI downloads Anaconda downloads

What is it?

PyTrack is a Python package that integrates the recorded GPS coordinates with data provided by the open-source OpenStreetMap (OSM). PyTrack can serve the intelligent transport research, e.g. to reconstruct the video of a vehicle’s route by exploiting available data and without equipping it with camera sensors, to update the urban road network, and so on.

If you use PyTrack in your work, please cite the journal article.

Citation info: M. Tortora, E. Cordelli and P. Soda, "PyTrack: a Map-Matching-based Python Toolbox for Vehicle Trajectory Reconstruction," in IEEE Access, vol. 10, pp. 112713-112720, 2022, doi: 10.1109/ACCESS.2022.3216565.

@ARTICLE{mtpytrack,  
      author={Tortora, Matteo and Cordelli, Ermanno and Soda, Paolo},
      journal={IEEE Access}, 
      title={PyTrack: A Map-Matching-Based Python Toolbox for Vehicle Trajectory Reconstruction}, 
      year={2022},
      volume={10},
      number={},
      pages={112713-112720},
      doi={10.1109/ACCESS.2022.3216565}}

Main Features

The following are the main features that PyTrack includes:

  • Generation of the street network graph using geospatial data from OpenStreetMap
  • Map-matching
  • Data cleaning
  • Video reconstruction of the GPS route
  • Visualisation and analysis capabilities

Getting Started

Installation

The source code is currently hosted on GitHub at: https://github.com/cosbidev/PyTrack. PyTrack can be installed using*:

# conda
conda install pytrack 
# or PyPI
pip install PyTrack-lib

*for Mac m1 users, it is recommended to use conda in order to be able to install all dependencies.

Documentation

Checkout the official documentation. Besides, here you can see some examples of the application of the library.

Examples

Map-Matching

To see the map-matching feature of PyTrack in action please go to map-matching documentation.

<p align="center"> <a href="https://pytrack-lib.readthedocs.io/en/latest/notebooks/create_video_path.html"> <img width="1000" src="https://raw.githubusercontent.com/cosbidev/PyTrack/main/logo/example.png" alt="map-matching"></a> </p>

Video reconstruction of the itinerary

<p align="center"> <a href="https://pytrack-lib.readthedocs.io/en/latest/notebooks/create_video_path.html"> <img width="400" src="https://raw.githubusercontent.com/cosbidev/PyTrack/main/logo/video.gif" alt="video_track"></a> <a href="https://pytrack-lib.readthedocs.io/en/latest/notebooks/segmentation_video_path.html"> <img width="400" src="https://raw.githubusercontent.com/cosbidev/PyTrack/main/logo/video_seg.gif" alt="video_seg_track"></a> </p>

Contributing to PyTrack

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

Author

Created by Matteo Tortora - feel free to contact me!

<!--- ## Citation If you use PyTrack in your work, please cite the [journal paper](). ```bibtex ``` -->

License

PyTrack is distributed under a BSD-3-Clause-Clear Licence.

View on GitHub
GitHub Stars78
CategoryDevelopment
Updated2d ago
Forks13

Languages

Python

Security Score

100/100

Audited on Mar 30, 2026

No findings