PHPackages                             lraveri/geojson-converter - 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. lraveri/geojson-converter

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

lraveri/geojson-converter
=========================

v1.2.0(11mo ago)53.4k↓10.4%3MITPHPPHP ^7.1||^8.0

Since Jan 25Pushed 11mo ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

Convert KML and GPX to GeoJSON in PHP
=====================================

[](#convert-kml-and-gpx-to-geojson-in-php)

Description
-----------

[](#description)

`geojson-converter` is a PHP library for converting GPX and KML files into GeoJSON format. This library is particularly useful for projects that require a quick and reliable conversion of mapping file formats.

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

[](#installation)

To install `geojson-converter`, use the following command in your project:

```
composer require lraveri/geojson-converter
```

Usage
-----

[](#usage)

### Converting GPX Files to GeoJSON

[](#converting-gpx-files-to-geojson)

To convert a GPX file to GeoJSON:

```
$content = file_get_contents('/path/to/file.gpx');
$gpxConverter = new GpxConverter($content);
$geoJson = $gpxConverter->convert();`
```

### Converting KML Files to GeoJSON

[](#converting-kml-files-to-geojson)

To convert a KML file to GeoJSON:

```
$content = file_get_contents('/path/to/file.kml');
$kmlConverter = new KmlConverter($content);
$geoJson = $kmlConverter->convert();`
```

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

[](#requirements)

- PHP 7.1 or higher.

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

[](#contributing)

Interested in contributing? Fantastic! You can open a pull request or an issue on the [GitHub repository](https://github.com/lraveri/geojson-converter).

License
-------

[](#license)

This project is released under the MIT License. See the `LICENSE` file for more details.

Support
-------

[](#support)

If you have any questions or issues, feel free to create an issue on the GitHub repository.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance51

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~165 days

Total

4

Last Release

347d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37f536e73b9c986828e1b314ed577608c4146ba8df1d879aebe3efea79a502cf?d=identicon)[Luca Raveri](/maintainers/Luca%20Raveri)

---

Top Contributors

[![lraveri](https://avatars.githubusercontent.com/u/74551547?v=4)](https://github.com/lraveri "lraveri (14 commits)")[![impronta48](https://avatars.githubusercontent.com/u/5368022?v=4)](https://github.com/impronta48 "impronta48 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lraveri-geojson-converter/health.svg)

```
[![Health](https://phpackages.com/badges/lraveri-geojson-converter/health.svg)](https://phpackages.com/packages/lraveri-geojson-converter)
```

PHPackages © 2026

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