PHP 클래스 Location\Processor\Polyline\SimplifyBearing

저자: Marcus Jaschen ([email protected])
상속: implements Location\Processor\Polyline\SimplifyInterface
파일 보기 프로젝트 열기: mjaschen/phpgeo 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( float $bearingAngle ) SimplifyBearing constructor.
simplify ( Polyline $polyline ) : Polyline Simplifies the given polyline

메소드 상세

__construct() 공개 메소드

SimplifyBearing constructor.
public __construct ( float $bearingAngle )
$bearingAngle float

simplify() 공개 메소드

1. calculate the bearing angle between the first two points p1 and p2: b1 2. calculate the bearing angle between the next two points p2 and p3: b2 3. calculate the difference between b1 and b2: deltaB; if deltaB is smaller than the threshold angle, remove the middle point p2 4. start again at (1.) as long as the polyline contains more points
public simplify ( Polyline $polyline ) : Polyline
$polyline Location\Polyline
리턴 Location\Polyline