Skip to content

Model Reference

Geospacial model objects

Position2D

Bases: Model

Position in a 2D latitude / longitude space

latitude instance-attribute

Latitude of the point

longitude instance-attribute

Longitude of the point

Position3D

Bases: Position2D

Position in a 3D latitude / longitude / elevation space

elevation instance-attribute

Elevation of the point

latitude instance-attribute

Latitude of the point

longitude instance-attribute

Longitude of the point

ElevationMetrics

Bases: Model

Collection of elevation related metrics

downhill instance-attribute

Downhill elevation in m

slopes instance-attribute

Slopes between points in a uphill/downhill section

uphill instance-attribute

Upill elevation in m

SegmentOverview

Bases: Model

Collection of metrics for a Segment

avg_velocity instance-attribute

Average velocity in the segment in m/s (only considering velocities below the XX percentile)

avg_velocity_kmh = Field(default=None) class-attribute instance-attribute

avg_speed converted the km/h

downhill_elevation instance-attribute

Elevation traveled downhill in m

max_elevation instance-attribute

Maximum elevation in the segment in m

max_velocity instance-attribute

Maximum velocity in the segment in m/s (only considering velocities below the XX percentile)

max_velocity_kmh = Field(default=None) class-attribute instance-attribute

max_velocity converted the km/h

min_elevation instance-attribute

Minimum elevation in the segment in m

moving_distance instance-attribute

Moving distance (point-to-point distance with velocity below a threshold) in m

moving_distance_km = Field(default=-1) class-attribute instance-attribute

moving_distance converted the km

moving_time_seconds instance-attribute

Moving time of a segment

total_distance instance-attribute

Total distance of the segment in m

total_distance_km = Field(default=-1) class-attribute instance-attribute

total_distance converted the km

total_time_seconds instance-attribute

Total time of the segment

uphill_elevation instance-attribute

Elevation traveled uphill in m

SegmentOverlap

Bases: Model

Represent the overlap between two segments

end_idx instance-attribute

Index of the last point in match segment

end_point instance-attribute

Last point matching the base segment

inverse instance-attribute

Match direction of the segment relative to the base

overlap instance-attribute

Overlap ratio of the segments

plate instance-attribute

2D representation of the segment overlap

start_idx instance-attribute

Index of the first point in match segment

start_point instance-attribute

First point matching the base segment

PointDistance

Bases: Model

Represents a distance calculati on to a point in a GPX track.

distance instance-attribute

The distance to the nearest point.

point instance-attribute

The nearest point on the track.

point_idx_abs instance-attribute

The absolute index of the nearest point in the track.

segment_idx instance-attribute

The index of the segment containing the nearest point.

segment_point_idx instance-attribute

The index of the nearest point within the containing segment.

Other model objects

ZoneInterval

Bases: Model

Represents a zone interval. Start or end can be None implying and interval that include all value smaller or larger than the provided value, respectively

Raises:

Type Description
ValueError

If start and end are None

color = None class-attribute instance-attribute

Optional color of the interval

end instance-attribute

Upper bound of the interval

name = None class-attribute instance-attribute

Optional name of the interval

start instance-attribute

Lower bound of the interval

Zones

Bases: Model

Represents a collection of zones. The list of intervals is required to contain open ZoneIntervals in the fist and last position. Furthermore the intervals can not have gaps.

Raises:

Type Description
ValueError

If not at least two intervals are provided in the object

ValueError

If some intervals have a name attached but not all (or none)

ValueError

If some intervals have a color attached but not all (or none)

ValueError

If first interval has a start value not equal to None

ValueError

If last interval has a end value not equal to None

ValueError

If consecutive intervals to not end/start with the same value

intervals instance-attribute

A list of intervals comprising the collection of zones

meta_info = None class-attribute instance-attribute

Optional meta information about the zones