PHPackages                             rozklad/heremaps-flexible-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. rozklad/heremaps-flexible-polyline

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

rozklad/heremaps-flexible-polyline
==================================

PHP implementation of Flexible Polyline encoding: a lossy compressed representation of a list of coordinate pairs or triples

1.0.3(5y ago)2314.5k↓12.7%31MITPHPPHP &gt;=7.2.0

Since Nov 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rozklad/heremaps-flexible-polyline)[ Packagist](https://packagist.org/packages/rozklad/heremaps-flexible-polyline)[ Docs](https://github.com/heremaps/flexible-polyline)[ RSS](/packages/rozklad-heremaps-flexible-polyline/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

Testing
-------

[](#testing)

```
composer test

```

Usage
-----

[](#usage)

### Decode

[](#decode)

FlexiblePolyline::decode(string $encoded): array

```
$data = FlexiblePolyline::decode('BlBoz5xJ67i1BU1B7PUzIhaUxL7YU');
/** $data:
[
    'precision' => 5,
    'thirdDim' => 2,
    'thirdDimPrecision' => 0,
    'polyline' => [
        [50.10228, 8.69821, 10],
        [50.10201, 8.69567, 20],
        [50.10063, 8.6915, 30],
        [50.09878, 8.68752, 40]
    ]
]
*/

```

### Encode

[](#encode)

FlexiblePolyline::encode(array $coordinates \[, int $precision = null, int $thirdDim = null, int $thirdDimPrecision = 0\]): string

```
$encoded = FlexiblePolyline::encode([
    [50.10228, 8.69821, 10],
    [50.10201, 8.69567, 20],
    [50.10063, 8.6915, 30],
    [50.09878, 8.68752, 40]
], 5, 2, 0);
/** $encoded:
BlBoz5xJ67i1BU1B7PUzIhaUxL7YU
*/

```

### Third Dimension

[](#third-dimension)

FlexiblePolyline::getThirdDimension(string $encoded): int

```
$thirdDimension = FlexiblePolyline::getThirdDimension('BVoz5xJ67i1BU')
/** $thirdDimension:
1
*/

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1860d ago

PHP version history (2 changes)1.0.0PHP ~7.2

1.0.3PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/96aeaa27788e7a7dac7b523b0c01d8768d4aea6f28bfaa5233db25fb8955a197?d=identicon)[rozklad](/maintainers/rozklad)

---

Top Contributors

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

---

Tags

heremapsflexible-polyline

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rozklad-heremaps-flexible-polyline/health.svg)

```
[![Health](https://phpackages.com/badges/rozklad-heremaps-flexible-polyline/health.svg)](https://phpackages.com/packages/rozklad-heremaps-flexible-polyline)
```

###  Alternatives

[wi1dcard/baidu-mini-program-sdk

百度小程序第三方 PHP SDK，助力智能小程序开发。

544.0k1](/packages/wi1dcard-baidu-mini-program-sdk)[werfu/magento2-url-key-mask

Enable Product and Category URL\_key generation using masks

135.4k](/packages/werfu-magento2-url-key-mask)

PHPackages © 2026

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