PHPackages                             krasilnikov-spb/php-rdp - 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. krasilnikov-spb/php-rdp

ActiveLibrary

krasilnikov-spb/php-rdp
=======================

PHP implementation of the Ramer-Douglas-Peucker algorithm for reducing the number of points on a polyline

0.3.0(5y ago)012PHPPHP ^7.1CI failing

Since May 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/krasilnikov-spb/php-rdp)[ Packagist](https://packagist.org/packages/krasilnikov-spb/php-rdp)[ Docs](https://github.com/krasilnikov-spb/php-rdp)[ RSS](/packages/krasilnikov-spb-php-rdp/feed)WikiDiscussions master Synced today

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

php-rdp
=======

[](#php-rdp)

PHP implementation of the Ramer-Douglas-Peucker algorithm for reducing the number of points on a polyline

Install
-------

[](#install)

```
composer install

```

Tests
-----

[](#tests)

```
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/TestSimplify

```

Usage
-----

[](#usage)

```
$track = [
           [
             "point" => ["lat" => 11.11, "lon" => 12.12],
             "other_data" => [...]
           ],
           ....
         ];

$rdp = new \phpRdp\phpRdp("point.lat", "point.lon", 0.001, "km");

$simplified_track = $rdp->RamerDouglasPeucker($track);

```

You can look at working example at tests/TestSimplify.php

### Filter

[](#filter)

If you need to keep some points in certain period of seconds, you may use setDatetimeFilter.

This line enables filter and sets maximum distance between dots in track at 20 minutes:

```
$rdp->setDatetimeFilter("datetime", 20 * 60);

```

Authorship
----------

[](#authorship)

Based on code:  by David R. Edgar
Developed by Alexander Krasilnikov

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

2173d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0062ca6450d29c24941afd9a6517b7b548bed5b5217724b468e9254409edf08a?d=identicon)[krasilnikov-spb](/maintainers/krasilnikov-spb)

---

Top Contributors

[![krasilnikov-spb](https://avatars.githubusercontent.com/u/30845250?v=4)](https://github.com/krasilnikov-spb "krasilnikov-spb (7 commits)")

---

Tags

polylinesimplifyRamerDouglasPeucker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/krasilnikov-spb-php-rdp/health.svg)

```
[![Health](https://phpackages.com/badges/krasilnikov-spb-php-rdp/health.svg)](https://phpackages.com/packages/krasilnikov-spb-php-rdp)
```

###  Alternatives

[mjaschen/phpgeo

Simple Yet Powerful Geo Library

1.6k8.6M22](/packages/mjaschen-phpgeo)[david-r-edgar/rdp

Ramer–Douglas–Peucker algorithm for polyline simplification

2332.7k](/packages/david-r-edgar-rdp)[emcconville/point-reduction-algorithms

A collection of algorithms for reducing the number of points in polyline

61196.1k1](/packages/emcconville-point-reduction-algorithms)[emcconville/polyline-encoder

PHP Traits algorithms for Encoded Polyline &amp; Bing Point Compression

30260.2k1](/packages/emcconville-polyline-encoder)

PHPackages © 2026

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