Class GpxTrack
Represents a track - an ordered list of points describing a path. Similar to a GpxRoute, but separated into GpxTrackSegments at points that may indicate GPS reception temporarily dropping off or the receiver being turned off.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public sealed class GpxTrack
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the complex type "trkType".
Constructors
| Improve this Doc View SourceGpxTrack()
Initializes a new instance of the GpxTrack class.
Declaration
public GpxTrack()
GpxTrack(String, String, String, String, ImmutableArray<GpxWebLink>, Nullable<UInt32>, String, Object, ImmutableArray<GpxTrackSegment>)
Initializes a new instance of the GpxTrack class.
Declaration
public GpxTrack(string name, string comment, string description, string source, ImmutableArray<GpxWebLink> links, uint? number, string classification, object extensions, ImmutableArray<GpxTrackSegment> segments)
Parameters
Type | Name | Description |
---|---|---|
String | name | The value for Name. |
String | comment | The value for Comment. |
String | description | The value for Description. |
String | source | The value for Source. |
ImmutableArray<GpxWebLink> | links | The value for Links. |
Nullable<UInt32> | number | The value for Number. |
String | classification | The value for Classification. |
Object | extensions | The value for Extensions. |
ImmutableArray<GpxTrackSegment> | segments | The value for Segments. |
Properties
| Improve this Doc View SourceClassification
Gets the classification of the track.
Declaration
public string Classification { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "type" element.
Comment
Gets the GPS comment for this track.
Declaration
public string Comment { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "cmt" element.
Description
Gets the user description for this track.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "desc" element.
Extensions
Gets arbitrary extension information associated with this track.
Declaration
public object Extensions { get; }
Property Value
Type | Description |
---|---|
Object |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "extensions" element.
Links
Gets links to external information about the track.
Declaration
public ImmutableArray<GpxWebLink> Links { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<GpxWebLink> |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "link" elements.
Name
Get the GPS name of this track.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "name" element.
Number
Gets the GPS track number.
Declaration
public uint? Number { get; }
Property Value
Type | Description |
---|---|
Nullable<UInt32> |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "number" element.
Segments
Gets the segments that make up this track.
Declaration
public ImmutableArray<GpxTrackSegment> Segments { get; }
Property Value
Type | Description |
---|---|
ImmutableArray<GpxTrackSegment> |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "trkseg" elements.
Source
Gets the source of the data.
Declaration
public string Source { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "src" element.
Methods
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceWithClassification(String)
Builds a new instance of GpxTrack as a copy of this instance, but with Classification replaced by the given value.
Declaration
public GpxTrack WithClassification(string classification)
Parameters
Type | Name | Description |
---|---|---|
String | classification | The new value for Classification. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Classification value set to |
WithComment(String)
Builds a new instance of GpxTrack as a copy of this instance, but with Comment replaced by the given value.
Declaration
public GpxTrack WithComment(string comment)
Parameters
Type | Name | Description |
---|---|---|
String | comment | The new value for Comment. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Comment value set to |
WithDescription(String)
Builds a new instance of GpxTrack as a copy of this instance, but with Description replaced by the given value.
Declaration
public GpxTrack WithDescription(string description)
Parameters
Type | Name | Description |
---|---|---|
String | description | The new value for Description. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Description value set to |
WithExtensions(Object)
Builds a new instance of GpxTrack as a copy of this instance, but with Extensions replaced by the given value.
Declaration
public GpxTrack WithExtensions(object extensions)
Parameters
Type | Name | Description |
---|---|---|
Object | extensions | The new value for Extensions. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Extensions value set to |
WithLinks(ImmutableArray<GpxWebLink>)
Builds a new instance of GpxTrack as a copy of this instance, but with Links replaced by the given value.
Declaration
public GpxTrack WithLinks(ImmutableArray<GpxWebLink> links)
Parameters
Type | Name | Description |
---|---|---|
ImmutableArray<GpxWebLink> | links | The new value for Links. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Links value set to |
WithName(String)
Builds a new instance of GpxTrack as a copy of this instance, but with Name replaced by the given value.
Declaration
public GpxTrack WithName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The new value for Name. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Name value set to |
WithNumber(Nullable<UInt32>)
Builds a new instance of GpxTrack as a copy of this instance, but with Number replaced by the given value.
Declaration
public GpxTrack WithNumber(uint? number)
Parameters
Type | Name | Description |
---|---|---|
Nullable<UInt32> | number | The new value for Number. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Number value set to |
WithSegments(ImmutableArray<GpxTrackSegment>)
Builds a new instance of GpxTrack as a copy of this instance, but with Segments replaced by the given value.
Declaration
public GpxTrack WithSegments(ImmutableArray<GpxTrackSegment> segments)
Parameters
Type | Name | Description |
---|---|---|
ImmutableArray<GpxTrackSegment> | segments | The new value for Segments. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Segments value set to |
WithSource(String)
Builds a new instance of GpxTrack as a copy of this instance, but with Source replaced by the given value.
Declaration
public GpxTrack WithSource(string source)
Parameters
Type | Name | Description |
---|---|---|
String | source | The new value for Source. |
Returns
Type | Description |
---|---|
GpxTrack | A new GpxTrack instance that's a copy of the current instance, but
with its Source value set to |