Show / Hide Table of Contents

    Class GpxWaypoint

    Represents a waypoint, point of interest, or named feature on a map.

    Inheritance
    Object
    GpxWaypoint
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: NetTopologySuite.IO
    Assembly: NetTopologySuite.IO.GPX.dll
    Syntax
    public sealed class GpxWaypoint
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the simple type "wptType".

    Constructors

    | Improve this Doc View Source

    GpxWaypoint(Coordinate)

    Initializes a new instance of the GpxWaypoint class.

    Declaration
    public GpxWaypoint(Coordinate coordinate)
    Parameters
    Type Name Description
    Coordinate coordinate

    A to use to initialize Longitude and Latitude.

    Remarks

    and are assumed to be WGS-84 degrees, and is assumed to be an elevation in meters when it isn't equal to .

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when coordinate is null.

    ArgumentException

    Thrown when:

    • coordinate's value is not within the range of valid values for GpxLongitude,
    • coordinate's value is not within the range of valid values for GpxLatitude, or
    • coordinate's value IsInfinity(Double)
    | Improve this Doc View Source

    GpxWaypoint(GpxLongitude, GpxLatitude)

    Initializes a new instance of the GpxWaypoint class.

    Declaration
    public GpxWaypoint(GpxLongitude longitude, GpxLatitude latitude)
    Parameters
    Type Name Description
    GpxLongitude longitude

    The value for Longitude.

    GpxLatitude latitude

    The value for Latitude.

    | Improve this Doc View Source

    GpxWaypoint(GpxLongitude, GpxLatitude, Nullable<Double>)

    Initializes a new instance of the GpxWaypoint class.

    Declaration
    public GpxWaypoint(GpxLongitude longitude, GpxLatitude latitude, double? elevationInMeters)
    Parameters
    Type Name Description
    GpxLongitude longitude

    The value for Longitude.

    GpxLatitude latitude

    The value for Latitude.

    Nullable<Double> elevationInMeters

    The value for ElevationInMeters.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when elevationInMeters is HasValue and not a finite number.

    | Improve this Doc View Source

    GpxWaypoint(GpxLongitude, GpxLatitude, Nullable<Double>, Nullable<DateTime>, Nullable<GpxDegrees>, Nullable<Double>, String, String, String, String, ImmutableArray<GpxWebLink>, String, String, Nullable<GpxFixKind>, Nullable<UInt32>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<GpxDgpsStationId>, Object)

    Initializes a new instance of the GpxWaypoint class.

    Declaration
    public GpxWaypoint(GpxLongitude longitude, GpxLatitude latitude, double? elevationInMeters, DateTime? timestampUtc, GpxDegrees? magneticVariation, double? geoidHeight, string name, string comment, string description, string source, ImmutableArray<GpxWebLink> links, string symbolText, string classification, GpxFixKind? fixKind, uint? numberOfSatellites, double? horizontalDilutionOfPrecision, double? verticalDilutionOfPrecision, double? positionDilutionOfPrecision, double? secondsSinceLastDgpsUpdate, GpxDgpsStationId? dgpsStationId, object extensions)
    Parameters
    Type Name Description
    GpxLongitude longitude

    The value for Longitude.

    GpxLatitude latitude

    The value for Latitude.

    Nullable<Double> elevationInMeters

    The value for ElevationInMeters.

    Nullable<DateTime> timestampUtc

    The value for TimestampUtc.

    Nullable<GpxDegrees> magneticVariation

    The value for MagneticVariation.

    Nullable<Double> geoidHeight

    The value for GeoidHeight.

    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.

    String symbolText

    The value for SymbolText.

    String classification

    The value for Classification.

    Nullable<GpxFixKind> fixKind

    The value for FixKind.

    Nullable<UInt32> numberOfSatellites

    The value for NumberOfSatellites.

    Nullable<Double> horizontalDilutionOfPrecision

    The value for HorizontalDilutionOfPrecision.

    Nullable<Double> verticalDilutionOfPrecision

    The value for VerticalDilutionOfPrecision.

    Nullable<Double> positionDilutionOfPrecision

    The value for PositionDilutionOfPrecision.

    Nullable<Double> secondsSinceLastDgpsUpdate

    The value for SecondsSinceLastDgpsUpdate.

    Nullable<GpxDgpsStationId> dgpsStationId

    The value for DgpsStationId.

    Object extensions

    The value for Extensions.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when:

    • elevationInMeters is HasValue and not a finite number, or
    • timestampUtc is HasValue and its Kind is not Utc.

    Properties

    | Improve this Doc View Source

    Classification

    Gets the classification of this location.

    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.

    | Improve this Doc View Source

    Comment

    Gets the GPS comment of this location, to be transferred to and from the GPS.

    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.

    | Improve this Doc View Source

    Description

    Gets an additional text description for this location for the user (not the 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.

    | Improve this Doc View Source

    DgpsStationId

    Gets the ID of the DGPS station used in differential correction.

    Declaration
    public GpxDgpsStationId? DgpsStationId { get; }
    Property Value
    Type Description
    Nullable<GpxDgpsStationId>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "dgpsid" element.

    | Improve this Doc View Source

    ElevationInMeters

    Gets the elevation of this point, in meters.

    Declaration
    public double? ElevationInMeters { get; }
    Property Value
    Type Description
    Nullable<Double>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "ele" element.

    | Improve this Doc View Source

    Extensions

    Gets arbitrary extension information associated with this waypoint.

    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.

    | Improve this Doc View Source

    FixKind

    Gets the type of fix when this waypoint was generated.

    Declaration
    public GpxFixKind? FixKind { get; }
    Property Value
    Type Description
    Nullable<GpxFixKind>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "fix" element.

    | Improve this Doc View Source

    GeoidHeight

    Gets the height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid at this location, as defined in NMEA GGA message.

    Declaration
    public double? GeoidHeight { get; }
    Property Value
    Type Description
    Nullable<Double>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "geoidheight" element.

    | Improve this Doc View Source

    HorizontalDilutionOfPrecision

    Gets the horizontal dilution of precision.

    Declaration
    public double? HorizontalDilutionOfPrecision { get; }
    Property Value
    Type Description
    Nullable<Double>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "hdop" element.

    | Improve this Doc View Source

    Latitude

    Gets the latitude of this location, in decimal degrees (WGS84).

    Declaration
    public GpxLatitude Latitude { get; }
    Property Value
    Type Description
    GpxLatitude
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "lat" attribute.

    | Improve this Doc View Source

    Links

    Gets links to additional information about this location.

    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.

    | Improve this Doc View Source

    Longitude

    Gets the longitude of this location, in decimal degrees (WGS84).

    Declaration
    public GpxLongitude Longitude { get; }
    Property Value
    Type Description
    GpxLongitude
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "lon" attribute.

    | Improve this Doc View Source

    MagneticVariation

    Gets the magnetic variation at this location.

    Declaration
    public GpxDegrees? MagneticVariation { get; }
    Property Value
    Type Description
    Nullable<GpxDegrees>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "magvar" element.

    | Improve this Doc View Source

    Name

    Gets the GPS name of this location, to be transferred to and from the GPS.

    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.

    | Improve this Doc View Source

    NumberOfSatellites

    Gets the number of satellites used to calculate the GPS fix.

    Declaration
    public uint? NumberOfSatellites { get; }
    Property Value
    Type Description
    Nullable<UInt32>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "sat" element.

    | Improve this Doc View Source

    PositionDilutionOfPrecision

    Gets the position dilution of precision.

    Declaration
    public double? PositionDilutionOfPrecision { get; }
    Property Value
    Type Description
    Nullable<Double>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "pdop" element.

    | Improve this Doc View Source

    SecondsSinceLastDgpsUpdate

    Gets the number of seconds since the last DGPS update when this waypoint was generated.

    Declaration
    public double? SecondsSinceLastDgpsUpdate { get; }
    Property Value
    Type Description
    Nullable<Double>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "ageofdgpsdata" element.

    | Improve this Doc View Source

    Source

    Gets the source of the data, e.g., "Garmin eTrex", "USGS quad Boston North".

    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.

    | Improve this Doc View Source

    SymbolText

    Gets the text of the GPS symbol name for this location.

    Declaration
    public string SymbolText { get; }
    Property Value
    Type Description
    String
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "sym" element.

    | Improve this Doc View Source

    TimestampUtc

    Gets the creation / modification timestamp of this location, in UTC time.

    Declaration
    public DateTime? TimestampUtc { get; }
    Property Value
    Type Description
    Nullable<DateTime>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "time" element.

    | Improve this Doc View Source

    VerticalDilutionOfPrecision

    Gets the vertical dilution of precision.

    Declaration
    public double? VerticalDilutionOfPrecision { get; }
    Property Value
    Type Description
    Nullable<Double>
    Remarks

    In the official XSD schema for GPX 1.1, this corresponds to the "vdop" element.

    Methods

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    Object.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    | Improve this Doc View Source

    WithClassification(String)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Classification replaced by the given value.

    Declaration
    public GpxWaypoint WithClassification(string classification)
    Parameters
    Type Name Description
    String classification

    The new value for Classification.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Classification value set to classification.

    | Improve this Doc View Source

    WithComment(String)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Comment replaced by the given value.

    Declaration
    public GpxWaypoint WithComment(string comment)
    Parameters
    Type Name Description
    String comment

    The new value for Comment.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Comment value set to comment.

    | Improve this Doc View Source

    WithDescription(String)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Description replaced by the given value.

    Declaration
    public GpxWaypoint WithDescription(string description)
    Parameters
    Type Name Description
    String description

    The new value for Description.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Description value set to description.

    | Improve this Doc View Source

    WithDgpsStationId(Nullable<GpxDgpsStationId>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with DgpsStationId replaced by the given value.

    Declaration
    public GpxWaypoint WithDgpsStationId(GpxDgpsStationId? dgpsStationId)
    Parameters
    Type Name Description
    Nullable<GpxDgpsStationId> dgpsStationId

    The new value for DgpsStationId.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its DgpsStationId value set to dgpsStationId.

    | Improve this Doc View Source

    WithElevationInMeters(Nullable<Double>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with ElevationInMeters replaced by the given value.

    Declaration
    public GpxWaypoint WithElevationInMeters(double? elevationInMeters)
    Parameters
    Type Name Description
    Nullable<Double> elevationInMeters

    The new value for ElevationInMeters.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its ElevationInMeters value set to elevationInMeters.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when elevationInMeters is HasValue and IsNaN(Double).

    | Improve this Doc View Source

    WithExtensions(Object)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Extensions replaced by the given value.

    Declaration
    public GpxWaypoint WithExtensions(object extensions)
    Parameters
    Type Name Description
    Object extensions

    The new value for Extensions.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Extensions value set to extensions.

    | Improve this Doc View Source

    WithFixKind(Nullable<GpxFixKind>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with FixKind replaced by the given value.

    Declaration
    public GpxWaypoint WithFixKind(GpxFixKind? fixKind)
    Parameters
    Type Name Description
    Nullable<GpxFixKind> fixKind

    The new value for FixKind.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its FixKind value set to fixKind.

    | Improve this Doc View Source

    WithGeoidHeight(Nullable<Double>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with GeoidHeight replaced by the given value.

    Declaration
    public GpxWaypoint WithGeoidHeight(double? geoidHeight)
    Parameters
    Type Name Description
    Nullable<Double> geoidHeight

    The new value for GeoidHeight.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its GeoidHeight value set to geoidHeight.

    | Improve this Doc View Source

    WithHorizontalDilutionOfPrecision(Nullable<Double>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with HorizontalDilutionOfPrecision replaced by the given value.

    Declaration
    public GpxWaypoint WithHorizontalDilutionOfPrecision(double? horizontalDilutionOfPrecision)
    Parameters
    Type Name Description
    Nullable<Double> horizontalDilutionOfPrecision

    The new value for HorizontalDilutionOfPrecision.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its HorizontalDilutionOfPrecision value set to horizontalDilutionOfPrecision.

    | Improve this Doc View Source

    WithLatitude(GpxLatitude)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Latitude replaced by the given value.

    Declaration
    public GpxWaypoint WithLatitude(GpxLatitude latitude)
    Parameters
    Type Name Description
    GpxLatitude latitude

    The new value for Latitude.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Latitude value set to latitude.

    | Improve this Doc View Source

    WithLinks(ImmutableArray<GpxWebLink>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Links replaced by the given value.

    Declaration
    public GpxWaypoint WithLinks(ImmutableArray<GpxWebLink> links)
    Parameters
    Type Name Description
    ImmutableArray<GpxWebLink> links

    The new value for Links.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Links value set to links.

    | Improve this Doc View Source

    WithLongitude(GpxLongitude)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Longitude replaced by the given value.

    Declaration
    public GpxWaypoint WithLongitude(GpxLongitude longitude)
    Parameters
    Type Name Description
    GpxLongitude longitude

    The new value for Longitude.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Longitude value set to longitude.

    | Improve this Doc View Source

    WithMagneticVariation(Nullable<GpxDegrees>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with MagneticVariation replaced by the given value.

    Declaration
    public GpxWaypoint WithMagneticVariation(GpxDegrees? magneticVariation)
    Parameters
    Type Name Description
    Nullable<GpxDegrees> magneticVariation

    The new value for MagneticVariation.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its MagneticVariation value set to magneticVariation.

    | Improve this Doc View Source

    WithName(String)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Name replaced by the given value.

    Declaration
    public GpxWaypoint WithName(string name)
    Parameters
    Type Name Description
    String name

    The new value for Name.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Name value set to name.

    | Improve this Doc View Source

    WithNumberOfSatellites(Nullable<UInt32>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with NumberOfSatellites replaced by the given value.

    Declaration
    public GpxWaypoint WithNumberOfSatellites(uint? numberOfSatellites)
    Parameters
    Type Name Description
    Nullable<UInt32> numberOfSatellites

    The new value for NumberOfSatellites.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its NumberOfSatellites value set to numberOfSatellites.

    | Improve this Doc View Source

    WithPositionDilutionOfPrecision(Nullable<Double>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with PositionDilutionOfPrecision replaced by the given value.

    Declaration
    public GpxWaypoint WithPositionDilutionOfPrecision(double? positionDilutionOfPrecision)
    Parameters
    Type Name Description
    Nullable<Double> positionDilutionOfPrecision

    The new value for PositionDilutionOfPrecision.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its PositionDilutionOfPrecision value set to positionDilutionOfPrecision.

    | Improve this Doc View Source

    WithSecondsSinceLastDgpsUpdate(Nullable<Double>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with SecondsSinceLastDgpsUpdate replaced by the given value.

    Declaration
    public GpxWaypoint WithSecondsSinceLastDgpsUpdate(double? secondsSinceLastDgpsUpdate)
    Parameters
    Type Name Description
    Nullable<Double> secondsSinceLastDgpsUpdate

    The new value for SecondsSinceLastDgpsUpdate.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its SecondsSinceLastDgpsUpdate value set to secondsSinceLastDgpsUpdate.

    | Improve this Doc View Source

    WithSource(String)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with Source replaced by the given value.

    Declaration
    public GpxWaypoint WithSource(string source)
    Parameters
    Type Name Description
    String source

    The new value for Source.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its Source value set to source.

    | Improve this Doc View Source

    WithSymbolText(String)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with SymbolText replaced by the given value.

    Declaration
    public GpxWaypoint WithSymbolText(string symbolText)
    Parameters
    Type Name Description
    String symbolText

    The new value for SymbolText.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its SymbolText value set to symbolText.

    | Improve this Doc View Source

    WithTimestampUtc(Nullable<DateTime>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with TimestampUtc replaced by the given value.

    Declaration
    public GpxWaypoint WithTimestampUtc(DateTime? timestampUtc)
    Parameters
    Type Name Description
    Nullable<DateTime> timestampUtc

    The new value for TimestampUtc.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its TimestampUtc value set to timestampUtc.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when timestampUtc is HasValue and its Kind is not Utc.

    | Improve this Doc View Source

    WithVerticalDilutionOfPrecision(Nullable<Double>)

    Builds a new instance of GpxWaypoint as a copy of this instance, but with VerticalDilutionOfPrecision replaced by the given value.

    Declaration
    public GpxWaypoint WithVerticalDilutionOfPrecision(double? verticalDilutionOfPrecision)
    Parameters
    Type Name Description
    Nullable<Double> verticalDilutionOfPrecision

    The new value for VerticalDilutionOfPrecision.

    Returns
    Type Description
    GpxWaypoint

    A new GpxWaypoint instance that's a copy of the current instance, but with its VerticalDilutionOfPrecision value set to verticalDilutionOfPrecision.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX