PHPackages                             danmatthews/phpgpx - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. danmatthews/phpgpx

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

danmatthews/phpgpx
==================

A simple PHP library for GPX import/export forked from sibyx/phpgpx

1.0-RC1(9y ago)028MITPHPPHP &gt;=5.4

Since Feb 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/danmatthews/phpGPX)[ Packagist](https://packagist.org/packages/danmatthews/phpgpx)[ RSS](/packages/danmatthews-phpgpx/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

phpGPX
======

[](#phpgpx)

[![Open Source Love](https://camo.githubusercontent.com/2d4eac62d5f5830a5309100b88e0ecccb171aee1fbcd794149f4a580b0010c56/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f6d69742f6d69742e7376673f763d313032)](https://github.com/ellerbrock/open-source-badge/)[![Code Climate](https://camo.githubusercontent.com/e4b9e6e129c2215839176932260d4ff24420ef252a5a8d7133619634eb2ff489/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f53696279782f7068704750582f6261646765732f6770612e737667)](https://codeclimate.com/github/Sibyx/phpGPX)

Simple library written in PHP for reading and creating [GPX files](https://en.wikipedia.org/wiki/GPS_Exchange_Format).

Library is currently marked as Release Candidate but is already used in production on several project without any problems. [Documentation](https://sibyx.github.io/phpGPX/) is available using GitHub pages generated by Jekyll.

Contribution and feedback is welcome! Please check the issues for TODO. I will be happy every feature or pull request.

Features
--------

[](#features)

- Full support of [official specification](http://www.topografix.com/GPX/1/1/).
- Statistics calculation.
- Extensions.
- JSON &amp; XML &amp; PHP Array output.

### Supported Extensions

[](#supported-extensions)

- Garmin [TrackPointExtension](https://www8.garmin.com/xmlschemas/TrackPointExtensionv1.xsd):

### Stats calculation

[](#stats-calculation)

- Distance (m)
- Average speed (m/s)
- Average pace (s/km)
- Min / max altitude (m)
- Start / end (DateTime object)
- Duration (seconds)

Examples
--------

[](#examples)

### Open GPX file and load basic stats

[](#open-gpx-file-and-load-basic-stats)

```
