PHP Class Location\Processor\Polyline\Simplify

Deprecation: This class is no longer supported. Please use the `SimplifyDouglasPeucker` oder `SimplifyBearing` classes.
Author: Marcus Jaschen ([email protected])
Datei anzeigen Open project: mjaschen/phpgeo Class Usage Examples

Protected Properties

Property Type Description
$polyline Location\Polyline

Public Methods

Method Description
__construct ( Polyline $polyline )
simplify ( float $tolerance ) : Polyline

Protected Methods

Method Description
deg2radLatitude ( float $latitude ) : float
deg2radLongitude ( float $longitude ) : float
douglasPeucker ( array $line, float $tolerance ) : array
getPerpendicularDistance ( Coordinate $point, Line $line ) : float

Method Details

__construct() public method

public __construct ( Polyline $polyline )
$polyline Location\Polyline

deg2radLatitude() protected method

protected deg2radLatitude ( float $latitude ) : float
$latitude float
return float

deg2radLongitude() protected method

protected deg2radLongitude ( float $longitude ) : float
$longitude float
return float

douglasPeucker() protected method

protected douglasPeucker ( array $line, float $tolerance ) : array
$line array
$tolerance float
return array

getPerpendicularDistance() protected method

protected getPerpendicularDistance ( Coordinate $point, Line $line ) : float
$point Location\Coordinate
$line Location\Line
return float

simplify() public method

public simplify ( float $tolerance ) : Polyline
$tolerance float The maximum allowed deviation
return Location\Polyline

Property Details

$polyline protected_oe property

protected Polyline,Location $polyline
return Location\Polyline