Class GpxRoute
Represents a route - an ordered list of waypoints representing a series of turn points leading to a destination.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public sealed class GpxRoute
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the complex type "rteType".
Constructors
| Improve this Doc View SourceGpxRoute()
Initializes a new instance of the GpxRoute class.
Declaration
public GpxRoute()
GpxRoute(String, String, String, String, ImmutableArray<GpxWebLink>, Nullable<UInt32>, String, Object, ImmutableGpxWaypointTable)
Initializes a new instance of the GpxRoute class.
Declaration
public GpxRoute(string name, string comment, string description, string source, ImmutableArray<GpxWebLink> links, uint? number, string classification, object extensions, ImmutableGpxWaypointTable waypoints)
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. |
| ImmutableGpxWaypointTable | waypoints | The value for Waypoints. |
Properties
| Improve this Doc View SourceClassification
Gets the classification of the route.
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 route.
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 text description for this route (not sent to GPS).
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 route.
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 route.
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 route.
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 route 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.
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.
Waypoints
Gets the waypoints that make up this route.
Declaration
public ImmutableGpxWaypointTable Waypoints { get; }
Property Value
| Type | Description |
|---|---|
| ImmutableGpxWaypointTable |
Remarks
In the official XSD schema for GPX 1.1, this corresponds to the "rtept" elements.
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 GpxRoute as a copy of this instance, but with Classification replaced by the given value.
Declaration
public GpxRoute WithClassification(string classification)
Parameters
| Type | Name | Description |
|---|---|---|
| String | classification | The new value for Classification. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Classification value set to |
WithComment(String)
Builds a new instance of GpxRoute as a copy of this instance, but with Comment replaced by the given value.
Declaration
public GpxRoute WithComment(string comment)
Parameters
| Type | Name | Description |
|---|---|---|
| String | comment | The new value for Comment. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Comment value set to |
WithDescription(String)
Builds a new instance of GpxRoute as a copy of this instance, but with Description replaced by the given value.
Declaration
public GpxRoute WithDescription(string description)
Parameters
| Type | Name | Description |
|---|---|---|
| String | description | The new value for Description. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Description value set to |
WithExtensions(Object)
Builds a new instance of GpxRoute as a copy of this instance, but with Extensions replaced by the given value.
Declaration
public GpxRoute WithExtensions(object extensions)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extensions | The new value for Extensions. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Extensions value set to |
WithLinks(ImmutableArray<GpxWebLink>)
Builds a new instance of GpxRoute as a copy of this instance, but with Links replaced by the given value.
Declaration
public GpxRoute WithLinks(ImmutableArray<GpxWebLink> links)
Parameters
| Type | Name | Description |
|---|---|---|
| ImmutableArray<GpxWebLink> | links | The new value for Links. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Links value set to |
WithName(String)
Builds a new instance of GpxRoute as a copy of this instance, but with Name replaced by the given value.
Declaration
public GpxRoute WithName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The new value for Name. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Name value set to |
WithNumber(Nullable<UInt32>)
Builds a new instance of GpxRoute as a copy of this instance, but with Number replaced by the given value.
Declaration
public GpxRoute WithNumber(uint? number)
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<UInt32> | number | The new value for Number. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Number value set to |
WithSource(String)
Builds a new instance of GpxRoute as a copy of this instance, but with Source replaced by the given value.
Declaration
public GpxRoute WithSource(string source)
Parameters
| Type | Name | Description |
|---|---|---|
| String | source | The new value for Source. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Source value set to |
WithWaypoints(IEnumerable<GpxWaypoint>)
Builds a new instance of GpxRoute as a copy of this instance, but with Waypoints replaced by the given value.
Declaration
public GpxRoute WithWaypoints(IEnumerable<GpxWaypoint> waypoints)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<GpxWaypoint> | waypoints | The new value for Waypoints. |
Returns
| Type | Description |
|---|---|
| GpxRoute | A new GpxRoute instance that's a copy of the current instance, but
with its Waypoints value set to |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |