[][src]Struct gpx::TrackSegment

pub struct TrackSegment {
    pub points: Vec<Waypoint>,
}

TrackSegment represents a list of track points.

This TrackSegment 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.

Fields

points: Vec<Waypoint>

Each Waypoint holds the coordinates, elevation, timestamp, and metadata for a single point in a track.

Methods

impl TrackSegment[src]

pub fn linestring(&self) -> LineString<f64>[src]

Gives the linestring of the segment's points, the sequence of points that comprises the track segment.

pub fn new() -> TrackSegment[src]

Creates a new TrackSegment with default values.

extern crate gpx;
extern crate geo_types;

use gpx::{TrackSegment, Waypoint};
use geo_types::Point;

fn main() {
    let mut trkseg: TrackSegment = TrackSegment::new();

    let point = Waypoint::new(Point::new(-121.97, 37.24));
    trkseg.points.push(point);
}

Trait Implementations

impl Clone for TrackSegment[src]

impl Debug for TrackSegment[src]

impl Default for TrackSegment[src]

impl From<TrackSegment> for Geometry<f64>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.