Show / Hide Table of Contents

    Class GpxReader

    Provides methods that read in GPX data from a XmlReader.

    Inheritance
    Object
    GpxReader
    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 static class GpxReader

    Methods

    | Improve this Doc View Source

    Read(XmlReader, GpxReaderSettings, GpxVisitorBase)

    Processes a GPX file, invoking callbacks on a GpxVisitorBase instance as elements are observed.

    Declaration
    public static void Read(XmlReader reader, GpxReaderSettings settings, GpxVisitorBase visitor)
    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.

    GpxVisitorBase visitor

    The GpxVisitorBase instance that will receive callbacks.

    Remarks

    This method is the "core" reading method; everything else builds off of this.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when reader or visitor 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

    ReadFeatures(XmlReader, GpxReaderSettings, GeometryFactory)

    Reads in NTS s and GPX metadata from an XmlReader.

    Declaration
    public static (GpxMetadata metadata, Feature[] features, object extensions) ReadFeatures(XmlReader reader, GpxReaderSettings settings, GeometryFactory geometryFactory)
    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.

    GeometryFactory geometryFactory

    The instance to use when creating the individual elements.

    Returns
    Type Description
    ValueTuple<GpxMetadata, Feature[], Object>

    The instances that represent the top-level GPX data elements, as well as the GpxMetadata for the GPX file and the top-level extension content from the file.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when reader or geometryFactory 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
    Back to top Generated by DocFX