Skip to main content

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:

Library Structure

Use Cases

stmeasures can be used in a variety of applications, including:

  1. Trajectory Clustering: Grouping similar movement patterns, such as vehicle paths or animal migrations.
  2. Outlier Detection: Identifying unusual trajectories in a dataset.
  3. Pattern Matching: Finding trajectories that follow a specific path or trend.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stmeasures-0.0.1.tar.gz (58.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stmeasures-0.0.1-py3-none-any.whl (63.4 kB view details)

Uploaded Python 3

File details

Details for the file stmeasures-0.0.1.tar.gz.

File metadata

  • Download URL: stmeasures-0.0.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

Hashes for stmeasures-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1c97683d023279d9cdb55fa1f01294c8d27a0456f18d57484f8d735a69cdaf3e
MD5 390d11664dc5084272b58a8314210d96
BLAKE2b-256 2f930028b585d85d4d20af727886a5cd31113faf33c85fc8fcfef620e5ff7413

See more details on using hashes here.

File details

Details for the file stmeasures-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: stmeasures-0.0.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

Hashes for stmeasures-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c7278cd17e9c628d8d42362ccb90c88937263af7dc5580d62a1b829be9543a9
MD5 dc85bab7e70ad165c2989ccd847aa992
BLAKE2b-256 f50dbded3c0d21f712baff906f3dda55f2f664626eda5920925a43300f2a8133

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page