PHP Class Location\Polyline

Author: Marcus Jaschen ([email protected])
Inheritance: implements location\GeometryInterface
Exibir arquivo Open project: mjaschen/phpgeo Class Usage Examples

Protected Properties

Property Type Description
$points array

Public Methods

Method Description
addPoint ( Coordinate $point )
format ( Location\Formatter\Polyline\FormatterInterface $formatter ) : mixed
getLength ( Location\Distance\DistanceInterface $calculator ) : float Calculates the length of the polyline.
getNumberOfPoints ( ) : integer
getPoints ( ) : array
getReverse ( ) : Polyline Create a new polyline with reversed order of points, i. e. reversed polyline direction.
getSegments ( ) : array

Method Details

addPoint() public method

public addPoint ( Coordinate $point )
$point Coordinate

format() public method

public format ( Location\Formatter\Polyline\FormatterInterface $formatter ) : mixed
$formatter Location\Formatter\Polyline\FormatterInterface
return mixed

getLength() public method

Calculates the length of the polyline.
public getLength ( Location\Distance\DistanceInterface $calculator ) : float
$calculator Location\Distance\DistanceInterface instance of distance calculation class
return float

getNumberOfPoints() public method

public getNumberOfPoints ( ) : integer
return integer

getPoints() public method

public getPoints ( ) : array
return array

getReverse() public method

Create a new polyline with reversed order of points, i. e. reversed polyline direction.
public getReverse ( ) : Polyline
return Polyline

getSegments() public method

public getSegments ( ) : array
return array

Property Details

$points protected_oe property

protected array $points
return array