Class NetTopologySuiteGpxFeatureConverter
Contains helper methods to convert back and forth between
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public static class NetTopologySuiteGpxFeatureConverter
Methods
| Improve this Doc View SourceToFeature(GpxRoute, GeometryFactory)
Creates a
Declaration
public static Feature ToFeature(GpxRoute route, GeometryFactory geometryFactory)
Parameters
Type | Name | Description |
---|---|---|
GpxRoute | route | The GpxRoute source. |
GeometryFactory | geometryFactory | The |
Returns
Type | Description |
---|---|
Feature | A |
Remarks
The values of
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ToFeature(GpxTrack, GeometryFactory)
Creates a
Declaration
public static Feature ToFeature(GpxTrack track, GeometryFactory geometryFactory)
Parameters
Type | Name | Description |
---|---|---|
GpxTrack | track | The GpxTrack source. |
GeometryFactory | geometryFactory | The |
Returns
Type | Description |
---|---|
Feature | A |
Remarks
The values of
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ToFeature(GpxWaypoint, GeometryFactory)
Creates a
Declaration
public static Feature ToFeature(GpxWaypoint waypoint, GeometryFactory geometryFactory)
Parameters
Type | Name | Description |
---|---|---|
GpxWaypoint | waypoint | The GpxWaypoint source. |
GeometryFactory | geometryFactory | The |
Returns
Type | Description |
---|---|
Feature | A |
Remarks
The values of
- Longitude goes to
instead, - Latitude goes to
instead, and - ElevationInMeters goes to
instead (when it's set)
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ToGpxRoute(IFeature)
Turns a
Declaration
public static GpxRoute ToGpxRoute(IFeature feature)
Parameters
Type | Name | Description |
---|---|---|
IFeature | feature | The |
Returns
Type | Description |
---|---|
GpxRoute | A more-or-less equivalent GpxRoute to |
Remarks
Values from
When the "Waypoints" attribute is populated in
- Longitude,
- Latitude, and
- ElevationInMeters (where
is set).
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ArgumentOutOfRangeException | Thrown by GpxLongitude(Double) or GpxLatitude(Double). |
ArgumentException | Thrown when |
ToGpxTrack(IFeature)
Turns a
Declaration
public static GpxTrack ToGpxTrack(IFeature feature)
Parameters
Type | Name | Description |
---|---|---|
IFeature | feature | The |
Returns
Type | Description |
---|---|
GpxTrack | A more-or-less equivalent GpxTrack to |
Remarks
Values from
When the "Segments" attribute is populated in
- Longitude,
- Latitude, and
- ElevationInMeters (if
has the flag).
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ArgumentOutOfRangeException | Thrown by GpxLongitude(Double) or GpxLatitude(Double). |
ArgumentException | Thrown when |
ToGpxWaypoint(IFeature)
Turns a
Declaration
public static GpxWaypoint ToGpxWaypoint(IFeature feature)
Parameters
Type | Name | Description |
---|---|---|
IFeature | feature | The |
Returns
Type | Description |
---|---|
GpxWaypoint | A more-or-less equivalent GpxWaypoint to |
Remarks
Values from
- Longitude comes from
, - Latitude comes from
, and - ElevationInMeters comes from
(when it's set)
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ArgumentOutOfRangeException | Thrown by GpxLongitude(Double) or GpxLatitude(Double). |
ArgumentException | Thrown when |