semvec/pypi-packages huggingface dataset:
snap-gpx-track-to-wpts 0.2.0
Snap GPX tracks to waypoints for more precise distance calculations
Requires Python: >=3.8

# snap-gpx-track-to-wpts

A small command-line Python tool that snaps tracks in GPX files to waypoints. This enables more precise distance calculations when waypoints are off-route.

## Installation

From PyPI (pip):

```
pip install snap-gpx-track-to-wpts
```

From PyPI (uv):

```
uv tool install snap-gpx-track-to-wpts
```

From source:

```
git clone https://github.com/andrashann/snap-gpx-track-to-wpts.git
cd snap-gpx-track-to-wpts
uv sync
```

## Usage

```
snap-gpx-track-to-wpts -i infile.gpx [-d maxdistance] [-m mode] [-f [outfile]]
```

When running from a source checkout, prefix with `uv run`:

```
uv run snap-gpx-track-to-wpts -i infile.gpx [-d maxdistance] [-m mode] [-f [outfile]]
```

| Argument | Required | Default | Description |
|----------|----------|---------|-------------|
| `-i infile.gpx` | Yes | | Input GPX file |
| `-d maxdistance` | No | `100` | Maximum distance (meters) from track to snap a waypoint; farther waypoints are discarded |
| `-m mode` | No | `add` | `add`: finds the point on the track closest to the waypoint -- not necessarily a track point itself, it could be between two track points e.g. on long straight segments. If it is not a track point, then we create this closest location as a track point. Then we create a duplicate, and between the original and the duplicate, we add the location of the waypoint as another track point. `move`: moves the closest track point to the waypoint location |
| `-f [outfile]` | No | stdout | If omitted: print to stdout. If `-f` with no argument: save to `<infile>_snapped_<maxdistance>.gpx`. If `-f outfile`: save to the specified file. |
| `--drop-unmatched-wpts` | No | off | Remove waypoints from the output that were not snapped to any track (i.e. farther than `-d` from all tracks). |

## Notes

- If there are multiple tracks, all tracks are modified. For each track, all waypoints are taken into account.
- If there are no tracks in the file, exits with a warning but no error.
- If there are no waypoints in the file, exits with a warning but no error.
- Only the tracks are changed and only the relevant points. Attributes of track points, such as timestamp, elevation, or heart rate are not modified.
- Routes and waypoints are not modified.
mmer 1.0.2
MMER: Multivariate Mixed Effects Regression.
Requires Python: >=3.10
Keywords: mmer, multivariate regression, mixed-effects, machine-learning, uncertainty quantification, ground motion models, earthquake engineering

# MMER: Python Package for Multivariate Mixed Effects Regression

[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PyPI](https://img.shields.io/pypi/v/mmer.svg)](https://pypi.org/project/mmer)
[![Documentation Status](https://readthedocs.org/projects/mmer/badge/?version=latest)](https://mmer.readthedocs.io/en/latest/?badge=latest)  

## Overview

**MMER** is a Python package for multivariate mixed-effects regression featuring a modular fixed-effects component. It supports parametric and non-parametric machine learning regressors (neural networks, random forests, XGBoost), handles multiple responses and grouping factors, and provides direct access to the covariance matrices arising from its multivariate formulation [[1]](#references).

## Table of Contents
- [Features and Installation](#features-and-installation)
- [User Guide](#user-guide)
- [License](#license)
- [Contact](#contact)
- [References](#references)

## Features and Installation

See the [Documentation](https://mmer.readthedocs.io/en/latest/?badge=latest).

## User Guide

The full documentation, including examples and the complete API reference, is available at [mmer.readthedocs.io](https://mmer.readthedocs.io/en/latest/?badge=latest).

## License

MMER is released under the [MIT License](https://opensource.org/licenses/MIT).  
See the [LICENSE](LICENSE) file for the full text.

## Contact

For questions or assistance, please feelfree to contact:

**S.M. Sajad Hussaini**  
📧 [hussaini.smsajad@gmail.com](mailto:hussaini.smsajad@gmail.com)

> Please include "MMER" in the subject line for a quicker response.

## Support the Project

If you find this package useful, contributions to help maintain and improve it, are always appreciated.

[![PayPal](https://img.shields.io/badge/PayPal-Donate-blue.svg)](https://www.paypal.com/paypalme/sajadhussaini)

## References

Please cite the following references for any formal study:  

**[1] Primary Reference**  
*A Multivariate Mixed-Effects Regression Framework for Ground Motion Modeling: Integrating Parametric and Machine Learning Approaches*  
*DOI: [To be added]*  
(Expected publication in the Journal of Earthquake Engineering and Structural Dynamics)

**[2] MMER Package**  
*MMER: Python Package for Multivariate Mixed Effects Regression*  
*DOI: https://doi.org/10.5281/zenodo.18068839*