SimplifyBearing
class SimplifyBearing implements SimplifyInterface (View source)
Simplify Polyline
Methods
__construct(float $bearingAngle)
SimplifyBearing constructor.
Details
at line 36
__construct(float $bearingAngle)
SimplifyBearing constructor.
at line 54
Polyline
simplify(Polyline $polyline)
Simplifies the given polyline
- calculate the bearing angle between the first two points p1 and p2: b1
- calculate the bearing angle between the next two points p2 and p3: b2
- calculate the difference between b1 and b2: deltaB; if deltaB is smaller than the threshold angle, remove the middle point p2
- start again at (1.) as long as the polyline contains more points