Show / Hide Table of Contents

    Class GpxWriter

    Provides methods that write out GPX data to a XmlWriter.

    Inheritance
    Object
    GpxWriter
    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 GpxWriter

    Methods

    | Improve this Doc View Source

    Write(XmlWriter, GpxWriterSettings, GpxMetadata, IEnumerable<IFeature>, IEnumerable<IFeature>, IEnumerable<IFeature>, Object)

    Writes the given features to an XmlWriter.

    Declaration
    public static void Write(XmlWriter writer, GpxWriterSettings settings, GpxMetadata metadata, IEnumerable<IFeature> waypointFeatures, IEnumerable<IFeature> routeFeatures, IEnumerable<IFeature> trackFeatures, object extensions)
    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.

    GpxMetadata metadata

    The GpxMetadata instance that includes metadata about the file. Required.

    IEnumerable<IFeature> waypointFeatures

    The s that include the top-level wpt instances. Optional, but if specified, each must be a feature.

    IEnumerable<IFeature> routeFeatures

    The s that include the top-level rte instances. Optional, but if specified, each must be a feature.

    IEnumerable<IFeature> trackFeatures

    The s that include the top-level trk instances. Optional, but if specified, each must be a feature.

    Object extensions

    The top-level extension data. Optional.

    | Improve this Doc View Source

    Write(XmlWriter, GpxWriterSettings, GpxMetadata, IEnumerable<IFeature>, Object)

    Writes the given features to an XmlWriter.

    Declaration
    public static void Write(XmlWriter writer, GpxWriterSettings settings, GpxMetadata metadata, IEnumerable<IFeature> features, object extensions)
    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.

    GpxMetadata metadata

    The GpxMetadata instance that includes metadata about the file. Required.

    IEnumerable<IFeature> features

    The s to write out. Required.

    Object extensions

    The top-level extension data. Optional.

    Remarks

    The top-level GPX data objects written out depend on the type, as follows:

    Type of Corresponding top-level data object
    GpxWaypoint
    GpxRoute
    GpxTrack
    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when writer, metadata, or features is null.

    ArgumentException

    Thrown when an element of features or its is null, or is not an instance of one of the recognized geometry types (see remarks).

    | Improve this Doc View Source

    Write(XmlWriter, GpxWriterSettings, GpxMetadata, IEnumerable<GpxWaypoint>, IEnumerable<GpxRoute>, IEnumerable<GpxTrack>, Object)

    Writes the given features to an XmlWriter.

    Declaration
    public static void Write(XmlWriter writer, GpxWriterSettings settings, GpxMetadata metadata, IEnumerable<GpxWaypoint> waypoints, IEnumerable<GpxRoute> routes, IEnumerable<GpxTrack> tracks, object extensions)
    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.

    GpxMetadata metadata

    The GpxMetadata instance that includes metadata about the file. Required.

    IEnumerable<GpxWaypoint> waypoints

    The top-level wpt instances to write out. Optional, but if specified, each element must be non-null.

    IEnumerable<GpxRoute> routes

    The top-level rte instances to write out. Optional, but if specified, each element must be non-null.

    IEnumerable<GpxTrack> tracks

    The top-level trk instances to write out. Optional, but if specified, each element must be non-null.

    Object extensions

    The top-level extension data. Optional.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when writer or metadata is null.

    ArgumentException

    Thrown when an element of waypoints, routes, or tracks is null.

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