PHPackages                             inspyrenees/phpgpxparser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. inspyrenees/phpgpxparser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

inspyrenees/phpgpxparser
========================

GPX parsing and analysis toolkit in PHP, with elevation correction using the IGN API.

1.2.3(5mo ago)01381MITPHPPHP &gt;=8.2

Since May 13Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/inspyrenees/PhpGpxParser)[ Packagist](https://packagist.org/packages/inspyrenees/phpgpxparser)[ RSS](/packages/inspyrenees-phpgpxparser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

PhpGpxParser
============

[](#phpgpxparser)

[![Latest Stable Version](https://camo.githubusercontent.com/3b3235e0e68507a3aab4d92fee076fa2f89d42451f013f0277951835b04f8c8c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e73707972656e6565732f7068706770787061727365722e737667)](https://packagist.org/packages/inspyrenees/phpgpxparser)[![Packagist downloads](https://camo.githubusercontent.com/0f8f88996b106c6222babdc851f9a0c4eb777450d9f85c2957ca0235851b17bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696e73707972656e6565732f7068706770787061727365722e737667)](https://packagist.org/packages/inspyrenees/phpgpxparser)[![PHP Version](https://camo.githubusercontent.com/4d9764bb38a320e9d9b6d8d118b814c42f6ed1b36d4b35613f38d8cee491e0b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696e73707972656e6565732f706870677078706172736572)](https://www.php.net/)

A modular GPX parser written in PHP, designed to analyze GPS tracks and enhance elevation data using the [IGN (Institut national de l'information géographique et forestière)](https://geoservices.ign.fr) API.

Features
--------

[](#features)

- Parse GPX files (tracks, segments, points)
- Calculate statistics (distance, elevation gain/loss, speed, time)
- Smooth elevation data with Savitzky-Golay filter
- Correct elevation using the official IGN elevation API
- Modular architecture (separate reader, writer, calculators)
- PSR-4 autoloading (compatible with modern PHP projects)

Installation
------------

[](#installation)

```
composer require inspyrenees/phpgpxparser
```

Requirements
------------

[](#requirements)

- PHP 8.1+
- Symfony HTTP Client
- Geotools Library

Basic Usage
-----------

[](#basic-usage)

```
use PhpGpxParser\PhpGpxParser;

$phpGpxParser = new PhpGpxParser();
$stats = $phpGpxParser
    ->read($this->gpxFilePath)
    ->smoothElevation() // Optional: apply Savitzky-Golay smoothing
    ->stats();

echo "Total Distance: " . $stats->getTotalDistance() . " m";
echo "Elevation Gain: " . $stats->getElevationGain() . " m";
echo "Average Speed: " . $stats->getAvgSpeed() . " km/h";
```

You can apply a **Savitzky-Golay filter** to smooth elevation data and reduce GPS noise using the `smoothElevation()` method before computing statistics.

🔗 Dependencies
--------------

[](#-dependencies)

- Symfony HTTP Client for robust network operations
- Geotools for precise geographical calculations

License
-------

[](#license)

This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance73

Regular maintenance activity

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~52 days

Total

8

Last Release

152d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.2.2PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/58d39ca44d8e765b5c1964f8e78b09210903a12503334233fd434a75802eb259?d=identicon)[inspyrenees](/maintainers/inspyrenees)

---

Top Contributors

[![simonmnt](https://avatars.githubusercontent.com/u/1232756?v=4)](https://github.com/simonmnt "simonmnt (24 commits)")

---

Tags

parserelevationgpxign

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inspyrenees-phpgpxparser/health.svg)

```
[![Health](https://phpackages.com/badges/inspyrenees-phpgpxparser/health.svg)](https://phpackages.com/packages/inspyrenees-phpgpxparser)
```

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
