PHPackages                             abduns/laravel-gpx-reader - 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. abduns/laravel-gpx-reader

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

abduns/laravel-gpx-reader
=========================

A Laravel package to read and work with GPX 1.1 files.

v2.0.4(1mo ago)147MITPHPPHP ^8.2CI passing

Since Dec 8Pushed 1mo agoCompare

[ Source](https://github.com/abduns/laravel-gpx-reader)[ Packagist](https://packagist.org/packages/abduns/laravel-gpx-reader)[ RSS](/packages/abduns-laravel-gpx-reader/feed)WikiDiscussions main Synced today

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

laravel-gpx-reader
==================

[](#laravel-gpx-reader)

A Laravel package to read and work with GPX 1.1 files.

[![Tests](https://github.com/abduns/laravel-gpx-reader/actions/workflows/tests.yml/badge.svg)](https://github.com/abduns/laravel-gpx-reader/actions)[![Version](https://camo.githubusercontent.com/ee636d481f51266b5495e5c5e2a333c7a3eab602da1b147af48eb44f0a62b97e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616264756e732f6c61726176656c2d6770782d7265616465722e737667)](https://packagist.org/packages/abduns/laravel-gpx-reader)[![Downloads](https://camo.githubusercontent.com/ae0dd0d78ae094db90c1b0771f9e46fe359e661d8c71fc5278d0ac5ac5e4a1cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616264756e732f6c61726176656c2d6770782d7265616465722e737667)](https://packagist.org/packages/abduns/laravel-gpx-reader)[![License](https://camo.githubusercontent.com/aee11de511d05255536c161b9776641cbfeb9027017662e4f55c902c35ee2f5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616264756e732f6c61726176656c2d6770782d7265616465722e737667)](LICENSE.md)

---

Features
--------

[](#features)

- Modern PHP support
- GPX 1.1 Support
- No External Dependencies
- Laravel Integration
- Type-Safe DTOs
- Validation with strict mode

---

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

[](#installation)

```
composer require abduns/laravel-gpx-reader
```

---

Quick Start
-----------

[](#quick-start)

```
use Dunn\GpxReader\Facades\Gpx;

// From file
$gpx = Gpx::parseFromFile('path/to/file.gpx');

echo $gpx->creator;
```

---

Why This Package?
-----------------

[](#why-this-package)

- Existing solutions are outdated
- Missing modern PHP features
- Poor developer experience
- No standards compliance
- Too framework-coupled

This package focuses on simplicity, interoperability, and modern developer ergonomics.

---

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Dunn\GpxReader\Facades\Gpx;

// From file
$gpx = Gpx::parseFromFile('path/to/file.gpx');

// From string
$gpx = Gpx::parseFromString($xmlString);
```

### Advanced Usage

[](#advanced-usage)

```
// Access metadata
echo $gpx->creator;
echo $gpx->version;
if ($gpx->metadata) {
    echo $gpx->metadata->name;
    echo $gpx->metadata->desc;
    echo $gpx->metadata->time?->format('Y-m-d H:i:s');
}

// Access Waypoints
foreach ($gpx->waypoints as $waypoint) {
    echo "Waypoint: {$waypoint->name} ({$waypoint->latitude}, {$waypoint->longitude})";
    echo " - Elevation: {$waypoint->elevation}"; // Access elevation
}

// Access Routes
foreach ($gpx->routes as $route) {
    echo "Route: {$route->name}";
    foreach ($route->points as $point) {
        echo " - Point: {$point->latitude}, {$point->longitude}";
        echo " - Elevation: {$point->elevation}"; // Access elevation
    }
}

// Access Tracks
foreach ($gpx->tracks as $track) {
    echo "Track: {$track->name}";
    foreach ($track->segments as $segment) {
        foreach ($segment->points as $point) {
            echo " - Point: {$point->latitude}, {$point->longitude}";
            echo " - Elevation: {$point->elevation}"; // Access elevation
        }
    }
}
```

### Configuration

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --tag="gpx-config"
```

```
return [
    'strict_mode' => true, // Throw exceptions for invalid GPX structure
    'timezone' => 'UTC',
];
```

---

Standards / Specifications
--------------------------

[](#standards--specifications)

- GPX 1.1 Schema

References:

-

---

Supported Features
------------------

[](#supported-features)

FeatureSupportGPX 1.1 parsing✅Track / Route / Waypoint✅Type-safe DTOs✅---

Compatibility
-------------

[](#compatibility)

PlatformSupportedPHP 8.2+✅Laravel 11.0+✅---

Design Goals
------------

[](#design-goals)

- Developer experience first
- Predictable APIs
- Minimal dependencies
- Strong typing
- Extensibility
- Interoperability

---

Architecture
------------

[](#architecture)

- Facade for ease of use
- DTOs for parsed GPX elements
- Native XML parsing

---

Performance
-----------

[](#performance)

OperationTimeParse typical GPX&lt; 10ms---

Testing
-------

[](#testing)

```
composer test
```

---

Roadmap
-------

[](#roadmap)

- Add GPX generation/writing
- Support older GPX 1.0 schema

---

Contributing
------------

[](#contributing)

Contributions, issues, and discussions are welcome.

---

Security
--------

[](#security)

If you discover security issues, please report them responsibly.

---

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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 ~27 days

Recently: every ~40 days

Total

7

Last Release

48d ago

Major Versions

v1.0.1 → v2.0.02025-12-08

PHP version history (3 changes)v1.0.0PHP ^8.1

v1.0.1PHP ^8.0

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28977075?v=4)[Abdun](/maintainers/abduns)[@abduns](https://github.com/abduns)

---

Top Contributors

[![abduns](https://avatars.githubusercontent.com/u/28977075?v=4)](https://github.com/abduns "abduns (13 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/abduns-laravel-gpx-reader/health.svg)

```
[![Health](https://phpackages.com/badges/abduns-laravel-gpx-reader/health.svg)](https://phpackages.com/packages/abduns-laravel-gpx-reader)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M374](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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