A library for measuring trajectory similarities.
Project description
Similar Trajectories Measurements (stmeasures)
stmeasures is a Python library designed to provide researchers in Geographic Information Systems (GIS) and related fields with simple and efficient tools for measuring the similarity between trajectories. This library supports a variety of use cases, scenarios, and contexts, depending on where, how, and why the trajectories were collected or analyzed.
Installation
Install it through PyPI:
pip install stmeasures
Usage
Once installed you can use all functionalites provided by this package.
import stmeasures
dataset = stmeasures.read_file("trajectories.json")
spad_metric = stmeasures.distance(dataset[4], dataset[53]) # Will get you the Spatial Assembling Distance between trajectories
Visualization
Data can be visualized using geojsonio package.
import stmeasures
import geojsonio
dataset = stmeasures.read_file("trajectories.json")
geojsonio.display(geojsonio.display(stmeasures.geojsonio_contents(trajectories=dataset[50:56]))) # Will display a map with the given trajectories in geojson.io
Key Features
- Diverse Algorithms: Includes multiple algorithms such as Hausdorff, Frechet, DTW, LCSS, Euclidean, and SPAD to suit different similarity measurement needs.
- Flexible Integration: Offers modular functions and customizable parameters for specific trajectory analysis tasks.
- Scalable Design: Suitable for individual comparisons, clustering, and pattern discovery in trajectory datasets.
Library Overview
The following diagram illustrates the structure and main components of the library:
Use Cases
stmeasures can be used in a variety of applications, including:
- Trajectory Clustering: Grouping similar movement patterns, such as vehicle paths or animal migrations.
- Outlier Detection: Identifying unusual trajectories in a dataset.
- Pattern Matching: Finding trajectories that follow a specific path or trend.
- Path Optimization Analysis: Comparing planned and actual paths to optimize logistics or urban planning.
About the Project
This project is part of a final bachelor's degree research initiative at IPN University (Mexico City, 2024). It aims to support GIS and data science communities with tools for trajectory similarity analysis. While still under development, the library is designed with extensibility and research-focused applications in mind.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stmeasures-0.0.1.1.tar.gz.
File metadata
- Download URL: stmeasures-0.0.1.1.tar.gz
- Upload date:
- Size: 58.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9044da1ec2e3843067598332c115e2ab977117f61b7e04f2f9c93c790693699
|
|
| MD5 |
95cd5217941fe892756c3c15703a0559
|
|
| BLAKE2b-256 |
862902796fb97a7776ac0c9f6f31f14e3524c0a772ec0228ddf5197d21d0c087
|
File details
Details for the file stmeasures-0.0.1.1-py3-none-any.whl.
File metadata
- Download URL: stmeasures-0.0.1.1-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44692a012079183be17fb902c7363e240e5e9baa99a0e9520b29a11dfa843613
|
|
| MD5 |
d49cc13f21f991f3fceb0722033451df
|
|
| BLAKE2b-256 |
aeeb21271784205996a5381732f0a4911e66941f61f612f4691b40e0a0fecbc6
|