Class GpxExtensionWriter
Provides hooks to turn extension content into GPX "extensions" elements.
The default behavior in this base class passes through an IEnumerable<T> of XElement objects if that's what's stored, otherwise it will yield an empty sequence. This allows us to round-trip when the default GpxExtensionReader implementation is used, and not much else.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public class GpxExtensionWriter
Methods
| Improve this Doc View SourceConvertExtensionCommon(Object)
Transforms an arbitrary extension object into a sequence of XElement instances to write out as the content of an "extensions" element.
If this method returns an empty sequence of elements, then the result will be an empty "extensions" element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
protected virtual IEnumerable<XElement> ConvertExtensionCommon(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as the content of an "extensions" element. |
ConvertGpxExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of /gpx/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
/gpx/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertGpxExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertMetadataExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of /gpx/metadata/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
/gpx/metadata/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertMetadataExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertRouteExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of rte/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
rte/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertRouteExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertRoutePointExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of rtept/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
rtept/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertRoutePointExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertTrackExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of trk/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
trk/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertTrackExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertTrackPointExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of trkpt/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
trkpt/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertTrackPointExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertTrackSegmentExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of trkseg/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
trkseg/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertTrackSegmentExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |
ConvertWaypointExtension(Object)
Transforms an arbitrary extension object into a sequence of XElement
instances to write out as the content of wpt/extensions.
If this method returns an empty sequence of elements, then the result will be an empty
wpt/extensions element.
If this method returns null, then the result will be the same as it would be if there were no extension content at all.
Declaration
public virtual IEnumerable<XElement> ConvertWaypointExtension(object extension)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | extension | The extension object to transform. |
Returns
| Type | Description |
|---|---|
| IEnumerable<XElement> | The content to write out as |