This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* An implementation of a modified Ramer-Douglas-Peucker algorithm for reducing | |
* the number of points on a polyline (aka polygonal chain aka track). | |
* https://en.wikipedia.org/wiki/Polygonal_chain | |
* | |
* For more information, see: | |
* http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm | |
* | |
* Main change is how to measure distance between a connection (aka line, reference) |