C# Class Mapsui.Providers.Wfs.Utilities.GeometryFactory

This class is the base class for geometry production. It provides some parsing routines for XML compliant to GML2/GML3.
Inheritance: IDisposable
Show file Open project: pauldendulk/Mapsui Class Usage Examples

Protected Properties

Property Type Description
CoordinatesNode AlternativePathNodesCollection
FeatureNode IPathNode
FeatureReader System.Xml.XmlReader
FeatureTypeInfo WfsFeatureTypeInfo
GeomReader System.Xml.XmlReader
Geoms Collection
LabelNode IPathNode
ServiceExceptionNode AlternativePathNodesCollection
XmlReader System.Xml.XmlReader

Public Methods

Method Description
Dispose ( ) : void

This method closes the XmlReader member and the used HttpClientUtil instance.

Protected Methods

Method Description
CreateFeature ( Geometry geom, string labelField, string labelValue ) : IFeature

This method adds a label to the collection.

GeometryFactory ( HttpClientUtil httpClientUtil, WfsFeatureTypeInfo featureTypeInfo ) : System

Protected constructor for the abstract class.

GeometryFactory ( XmlReader xmlReader, WfsFeatureTypeInfo featureTypeInfo ) : System

Protected constructor for the abstract class.

GetSubReaderOf ( XmlReader reader, string labelValue ) : XmlReader

This method retrieves an XmlReader within a specified context.

GetSubReaderOf ( XmlReader reader, string labelValue, List pathNodes ) : XmlReader

This method retrieves an XmlReader within a specified context. Moreover it collects label values before or after a geometry could be found.

ParseCoordinates ( XmlReader reader ) : Collection

This method parses a coordinates or posList(from 'GetFeature' response).

Private Methods

Method Description
CreateGeometries ( Features features ) : Collection

Abstract method - overwritten by derived classes for producing instances derived from Mapsui.Geometries.Geometry.

CreateReader ( HttpClientUtil httpClientUtil ) : void

This method initializes the XmlReader member.

InitializePathNodes ( ) : void

This method initializes path nodes needed by the derived classes.

InitializeSeparators ( ) : void

This method initializes separator variables for parsing coordinates. From GML specification: Coordinates can be included in a single string, but there is no facility for validating string content. The value of the 'cs' attribute is the separator for coordinate values, and the value of the 'ts' attribute gives the tuple separator (a single space by default); the default values may be changed to reflect local usage.

Method Details

CreateFeature() protected method

This method adds a label to the collection.
protected CreateFeature ( Geometry geom, string labelField, string labelValue ) : IFeature
geom Geometry
labelField string
labelValue string
return IFeature

Dispose() public method

This method closes the XmlReader member and the used HttpClientUtil instance.
public Dispose ( ) : void
return void

GeometryFactory() protected method

Protected constructor for the abstract class.
protected GeometryFactory ( HttpClientUtil httpClientUtil, WfsFeatureTypeInfo featureTypeInfo ) : System
httpClientUtil HttpClientUtil A configured instance for performing web requests
featureTypeInfo WfsFeatureTypeInfo A instance providing metadata of the featuretype to query
return System

GeometryFactory() protected method

Protected constructor for the abstract class.
protected GeometryFactory ( XmlReader xmlReader, WfsFeatureTypeInfo featureTypeInfo ) : System
xmlReader System.Xml.XmlReader An XmlReader instance
featureTypeInfo WfsFeatureTypeInfo A instance providing metadata of the featuretype to query
return System

GetSubReaderOf() protected method

This method retrieves an XmlReader within a specified context.
protected GetSubReaderOf ( XmlReader reader, string labelValue ) : XmlReader
reader System.Xml.XmlReader An XmlReader instance that is the origin of a created sub-reader
labelValue string A string array for recording a found label value. Pass 'null' to ignore searching for label values
return System.Xml.XmlReader

GetSubReaderOf() protected method

This method retrieves an XmlReader within a specified context. Moreover it collects label values before or after a geometry could be found.
protected GetSubReaderOf ( XmlReader reader, string labelValue, List pathNodes ) : XmlReader
reader System.Xml.XmlReader An XmlReader instance that is the origin of a created sub-reader
labelValue string A string array for recording a found label value. Pass 'null' to ignore searching for label values
pathNodes List A list of instances defining the context of the retrieved reader
return System.Xml.XmlReader

ParseCoordinates() protected method

This method parses a coordinates or posList(from 'GetFeature' response).
protected ParseCoordinates ( XmlReader reader ) : Collection
reader System.Xml.XmlReader An XmlReader instance at the position of the coordinates to read
return Collection

Property Details

CoordinatesNode protected property

protected AlternativePathNodesCollection,Mapsui.Providers.Wfs.Utilities CoordinatesNode
return AlternativePathNodesCollection

FeatureNode protected property

protected IPathNode FeatureNode
return IPathNode

FeatureReader protected property

protected XmlReader,System.Xml FeatureReader
return System.Xml.XmlReader

FeatureTypeInfo protected property

protected WfsFeatureTypeInfo,Mapsui.Providers.Wfs.Utilities FeatureTypeInfo
return WfsFeatureTypeInfo

GeomReader protected property

protected XmlReader,System.Xml GeomReader
return System.Xml.XmlReader

Geoms protected property

protected Collection Geoms
return Collection

LabelNode protected property

protected IPathNode LabelNode
return IPathNode

ServiceExceptionNode protected property

protected AlternativePathNodesCollection,Mapsui.Providers.Wfs.Utilities ServiceExceptionNode
return AlternativePathNodesCollection

XmlReader protected property

protected XmlReader,System.Xml XmlReader
return System.Xml.XmlReader