PHPackages                             traewelling/google-polyline - 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. traewelling/google-polyline

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

traewelling/google-polyline
===========================

A PHP library for encoding and decoding Google Maps polylines.

v0.3(6mo ago)36.4k↑625%MITPHPPHP &gt;=8.3CI passing

Since Jul 15Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Traewelling/GooglePolyline)[ Packagist](https://packagist.org/packages/traewelling/google-polyline)[ RSS](/packages/traewelling-google-polyline/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

GooglePolyline
==============

[](#googlepolyline)

[![run-tests](https://github.com/Traewelling/GooglePolyline/actions/workflows/php-tests.yml/badge.svg)](https://github.com/Traewelling/GooglePolyline/actions/workflows/php-tests.yml)[![PHPStan](https://github.com/Traewelling/GooglePolyline/actions/workflows/phpstan.yml/badge.svg)](https://github.com/Traewelling/GooglePolyline/actions/workflows/phpstan.yml)[![GitHub License](https://camo.githubusercontent.com/e5d02c6847eac95b8d5a548d8e9385ad3744448ab80734ef737bd1f786b90cc2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5472616577656c6c696e672f476f6f676c65506f6c796c696e65)](https://camo.githubusercontent.com/e5d02c6847eac95b8d5a548d8e9385ad3744448ab80734ef737bd1f786b90cc2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5472616577656c6c696e672f476f6f676c65506f6c796c696e65)[![Codacy Badge](https://camo.githubusercontent.com/1568a6e54ff4d45e87c3b0fbb8ae2fa9d28ce8b7ef5b386cae7fb918a52d4311/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6538666363373164316465393434376462383839336362303934346266313032)](https://app.codacy.com/gh/Traewelling/GooglePolyline/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)[![Codacy Badge](https://camo.githubusercontent.com/34fd56b315b26ba76f11ad4e1e32a5c6f9f181b9eb1897805002e6d71f254a2c/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f6538666363373164316465393434376462383839336362303934346266313032)](https://app.codacy.com/gh/Traewelling/GooglePolyline/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

Since [Transitous](https://transitous.org/)/[Motis](https://github.com/motis-project/motis) uses a non-standard implementation of Google's [Encoded Polyline Algorithm Format](https://developers.google.com/maps/documentation/utilities/polylinealgorithm), we needed to implement a custom decoder for it.

Motis returns a EPAF string in the `legGeometry` field with a custom precision of 7 decimal places in v1 and 6 decimal places in v2. Google's implementation uses 5 decimal places, so we need to adjust the precision accordingly.

This package supports every possible precision but is only tested with 5 and 6 decimal places.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance66

Regular maintenance activity

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Total

3

Last Release

199d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19890220?v=4)[Träwelling](/maintainers/traewelling)[@Traewelling](https://github.com/Traewelling)

---

Top Contributors

[![HerrLevin](https://avatars.githubusercontent.com/u/1267894?v=4)](https://github.com/HerrLevin "HerrLevin (8 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/traewelling-google-polyline/health.svg)

```
[![Health](https://phpackages.com/badges/traewelling-google-polyline/health.svg)](https://phpackages.com/packages/traewelling-google-polyline)
```

###  Alternatives

[laravel-frontend-presets/vuetify

Laravel 5.5+ Front-end preset for vuetify

8013.4k](/packages/laravel-frontend-presets-vuetify)[bigperson/auto-base-buy

The package allows you to access data through the base car by model

173.6k](/packages/bigperson-auto-base-buy)

PHPackages © 2026

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