Download the PHP package krasilnikov-spb/php-rdp without Composer
On this page you can find all versions of the php package krasilnikov-spb/php-rdp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download krasilnikov-spb/php-rdp
More information about krasilnikov-spb/php-rdp
Files in krasilnikov-spb/php-rdp
Download krasilnikov-spb/php-rdp
More information about krasilnikov-spb/php-rdp
Files in krasilnikov-spb/php-rdp
Vendor krasilnikov-spb
Package php-rdp
Short Description PHP implementation of the Ramer-Douglas-Peucker algorithm for reducing the number of points on a polyline
License
Homepage https://github.com/krasilnikov-spb/php-rdp
Package php-rdp
Short Description PHP implementation of the Ramer-Douglas-Peucker algorithm for reducing the number of points on a polyline
License
Homepage https://github.com/krasilnikov-spb/php-rdp
Please rate this library. Is it a good library?
Informations about the package php-rdp
php-rdp
PHP implementation of the Ramer-Douglas-Peucker algorithm for reducing the number of points on a polyline
Install
composer install
Tests
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/TestSimplify
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
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
Based on code: http://www.loughrigg.org/rdp/ by David R. Edgar
Developed by Alexander Krasilnikov [email protected]
All versions of php-rdp with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1
The package krasilnikov-spb/php-rdp contains the following files
Loading the files please wait ....