Class GpxWriter
Provides methods that write out GPX data to a XmlWriter.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public static class GpxWriter
Methods
| Improve this Doc View SourceWrite(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 |
GpxMetadata | metadata | The GpxMetadata instance that includes metadata about the file. Required. |
IEnumerable<IFeature> | waypointFeatures | The |
IEnumerable<IFeature> | routeFeatures | The |
IEnumerable<IFeature> | trackFeatures | The |
Object | extensions | The top-level extension data. Optional. |
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 |
GpxMetadata | metadata | The GpxMetadata instance that includes metadata about the file. Required. |
IEnumerable<IFeature> | features | The |
Object | extensions | The top-level extension data. Optional. |
Remarks
The top-level GPX data objects written out depend on the
Type of | Corresponding top-level data object |
---|---|
GpxWaypoint | |
GpxRoute | |
GpxTrack |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ArgumentException | Thrown when an element of |
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 |
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 |
ArgumentException | Thrown when an element of |