Show / Hide Table of Contents

    Class GpxFile

    A container that holds all the individual pieces of a GPX file and contains helper methods to (somwehat) easily read / write them on-the-fly.

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

    Properties

    | Improve this Doc View Source

    Extensions

    Gets or sets the top-level extensions for the entire file.

    Declaration
    public object Extensions { get; set; }
    Property Value
    Type Description
    Object
    | Improve this Doc View Source

    Metadata

    Gets or sets the GpxMetadata instance that describes the contents of this GPX file.

    Declaration
    public GpxMetadata Metadata { get; set; }
    Property Value
    Type Description
    GpxMetadata
    Exceptions
    Type Condition
    ArgumentNullException

    Thrown by the property setter, when trying to set the value to null.

    | Improve this Doc View Source

    Routes

    Gets the list of GpxRoute instances that describe the routes contained in this GPX file.

    Declaration
    public List<GpxRoute> Routes { get; }
    Property Value
    Type Description
    List<GpxRoute>
    | Improve this Doc View Source

    Tracks

    Gets the list of GpxTrack instances that describe the tracks contained in this GPX file.

    Declaration
    public List<GpxTrack> Tracks { get; }
    Property Value
    Type Description
    List<GpxTrack>
    | Improve this Doc View Source

    Waypoints

    Gets the list of GpxWaypoint instances that describe the top-level waypoints in this GPX file.

    Declaration
    public List<GpxWaypoint> Waypoints { get; }
    Property Value
    Type Description
    List<GpxWaypoint>

    Methods

    | Improve this Doc View Source

    BuildString(GpxWriterSettings)

    Builds the string representation of this file.

    Declaration
    public string BuildString(GpxWriterSettings settings)
    Parameters
    Type Name Description
    GpxWriterSettings settings

    The GpxWriterSettings instance to use to control how GPX instances get written out, or null to use a general-purpose default.

    Returns
    Type Description
    String

    The string representation of this file.

    | Improve this Doc View Source

    Parse(String, GpxReaderSettings)

    Reads the XML representation of a GPX file, and returns the result as an instance of GpxFile.

    Declaration
    public static GpxFile Parse(string text, GpxReaderSettings settings)
    Parameters
    Type Name Description
    String text

    The string representation of the GPX file.

    GpxReaderSettings settings

    The GpxReaderSettings instance to use to control how GPX instances get read in, or null to use a general-purpose default.

    Returns
    Type Description
    GpxFile

    A GpxFile instance that contains the same contents as the given GPX file.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when text is null.

    XmlException

    Thrown when text does not specify a valid GPX file (i.e., cases where XSD schema validation would fail, and/or some values are well outside of the slightly stricter, but still completely reasonable, limits imposed by the idiomatic .NET data types above and beyond the XSD limits).

    | Improve this Doc View Source

    ReadFrom(XmlReader, GpxReaderSettings)

    Reads the XML representation of a GPX file, and returns the result as an instance of GpxFile.

    Declaration
    public static GpxFile ReadFrom(XmlReader reader, GpxReaderSettings settings)
    Parameters
    Type Name Description
    XmlReader reader

    The XmlReader to read from.

    GpxReaderSettings settings

    The GpxReaderSettings instance to use to control how GPX instances get read in, or null to use a general-purpose default.

    Returns
    Type Description
    GpxFile

    A GpxFile instance that contains the same contents as the given GPX file.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when reader is null.

    XmlException

    Thrown when reader does not specify a valid GPX file (i.e., cases where XSD schema validation would fail, and/or some values are well outside of the slightly stricter, but still completely reasonable, limits imposed by the idiomatic .NET data types above and beyond the XSD limits).

    | Improve this Doc View Source

    WriteTo(XmlWriter, GpxWriterSettings)

    Writes this file to an XmlWriter.

    Declaration
    public void WriteTo(XmlWriter writer, GpxWriterSettings settings)
    Parameters
    Type Name Description
    XmlWriter writer

    The XmlWriter to write to.

    GpxWriterSettings settings

    The GpxWriterSettings instance to use to control how GPX instances get written out, or null to use a general-purpose default.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when writer is null.

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