Class GpxReader
Provides methods that read in GPX data from a XmlReader.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public static class GpxReader
Methods
| Improve this Doc View SourceRead(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 |
| 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 |
| XmlException | Thrown when |
ReadFeatures(XmlReader, GpxReaderSettings, GeometryFactory)
Reads in NTS
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 |
| GeometryFactory | geometryFactory | The |
Returns
| Type | Description |
|---|---|
| ValueTuple<GpxMetadata, Feature[], Object> | The |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
| XmlException | Thrown when |