Skip to the content.

phpGPX\Models\Segment

Class Segment A Track Segment holds a list of Track Points which are logically connected in order.

To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.

Properties

$points

public array<mixed,\phpGPX\Models\Point> $points

Array of segment points

$extensions

public \phpGPX\Models\Extensions $extensions

You can add extend GPX by adding your own elements from another schema here.

$stats

public \phpGPX\Models\Stats $stats

Methods

__construct

mixed phpGPX\Models\Segment::__construct()

Segment constructor.

toArray

array phpGPX\Models\Summarizable::toArray()

Serialize object to array

recalculateStats

void phpGPX\Models\StatsCalculator::recalculateStats()

Recalculate stats objects.