Class GpxExtensionReader
Provides hooks to interpret arbitrary GPX extension element content as (perhaps) something with a richer, more type-safe data model.
The default behavior in this base class preserves the XElement representation of the source data, so that a GpxExtensionWriter in its own default mode will be able to write it back out again.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.IO.GPX.dll
Syntax
public class GpxExtensionReader
Methods
| Improve this Doc View SourceConvertExtensionElementsCommon(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions"
element's content into a value suitable for an Extensions
property.
If an "extensions" element does not exist, then this method will not be called for that node.
If the "extensions" element exists, but it has no child elements, then this method will be called for that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it would be if the "extensions" element did not exist at all.
Declaration
protected virtual object ConvertExtensionElementsCommon(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in the corresponding |
ConvertGpxExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into what VisitExtensions(Object) should observe.
If /gpx/extensions
does not exist, then this method will not be called.
If /gpx/extensions/*
selects no elements, then this method will be called with an
empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if /gpx/extensions
did not exist at all.
Declaration
public virtual object ConvertGpxExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value that VisitExtensions(Object) should observe. |
ConvertMetadataExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions.
If /gpx/metadata/extensions
does not exist, then this method will not be called.
If /gpx/metadata/extensions/*
selects no elements, then this method will be
called with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if /gpx/metadata/extensions
did not exist at all.
Declaration
public virtual object ConvertMetadataExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |
ConvertRouteExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions.
If rte/extensions
does not exist, then this method will not be called for that
node.
If rte/extensions/*
selects no elements, then this method will be called for
that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if rte/extensions
did not exist at all.
Declaration
public virtual object ConvertRouteExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |
ConvertRoutePointExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions, when stored in a GpxRoute instance's table.
If rtept/extensions
does not exist, then this method will not be called for that
node.
If rtept/extensions/*
selects no elements, then this method will be called for
that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if rtept/extensions
did not exist at all.
Declaration
public virtual object ConvertRoutePointExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |
ConvertTrackExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions.
If trk/extensions
does not exist, then this method will not be called for that
node.
If trk/extensions/*
selects no elements, then this method will be called for
that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if trk/extensions
did not exist at all.
Declaration
public virtual object ConvertTrackExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |
ConvertTrackPointExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions, when stored in a GpxTrackSegment instance's table.
If trkpt/extensions
does not exist, then this method will not be called for that
node.
If trkpt/extensions/*
selects no elements, then this method will be called for
that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if trkpt/extensions
did not exist at all.
Declaration
public virtual object ConvertTrackPointExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |
ConvertTrackSegmentExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions.
If trkseg/extensions
does not exist, then this method will not be called for that
node.
If trkseg/extensions/*
selects no elements, then this method will be called for
that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if trkseg/extensions
did not exist at all.
Declaration
public virtual object ConvertTrackSegmentExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |
ConvertWaypointExtensionElement(IEnumerable<XElement>)
Transforms a sequence of XElement instances that represent an "extensions" element's content into a value suitable for Extensions, when stored in a waypoint that VisitWaypoint(GpxWaypoint) will observe.
If wpt/extensions
does not exist, then this method will not be called for that
node.
If wpt/extensions/*
selects no elements, then this method will be called for
that node, with an empty sequence of elements.
If this method returns null, then the result will be the same as it
would be if wpt/extensions
did not exist at all.
Declaration
public virtual object ConvertWaypointExtensionElement(IEnumerable<XElement> extensionElements)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XElement> | extensionElements | The individual elements of the "extensions" element's content. |
Returns
Type | Description |
---|---|
Object | The value to store in Extensions. |