Class KMLReader
Constructs Geometry objects from the OGC KML representation. Works only with KML geometry elements and may also parse attributes within these elements
Inherited Members
Namespace: NetTopologySuite.IO.KML
Assembly: NetTopologySuite.dll
Syntax
public class KMLReader
Constructors
| Edit this page View SourceKMLReader()
Creates a reader that creates objects using the default GeometryFactory.
Declaration
public KMLReader()
KMLReader(GeometryFactory)
Creates a reader that creates objects using the given GeometryFactory.
Declaration
public KMLReader(GeometryFactory geometryFactory)
Parameters
Type | Name | Description |
---|---|---|
GeometryFactory | geometryFactory | The factory used to create |
KMLReader(GeometryFactory, params string[])
Creates a reader that creates objects using the given GeometryFactory.
Declaration
public KMLReader(GeometryFactory geometryFactory, params string[] attributeNames)
Parameters
Type | Name | Description |
---|---|---|
GeometryFactory | geometryFactory | The factory used to create |
string[] | attributeNames | Names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc). |
KMLReader(params string[])
Creates a reader that creates objects using the default GeometryFactory.
Declaration
public KMLReader(params string[] attributeNames)
Parameters
Type | Name | Description |
---|---|---|
string[] | attributeNames | Names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc). |
Methods
| Edit this page View SourceRead(TextReader)
Reads a KML representation of a Geometry from a TextReader.
If any attribute names were specified during {@link KMLReader} construction, they will be stored as IDictionary<TKey, TValue> in UserData.Declaration
public Geometry Read(TextReader kmlStreamReader)
Parameters
Type | Name | Description |
---|---|---|
TextReader | kmlStreamReader | The text stream reader. |
Returns
Type | Description |
---|---|
Geometry | A |
Exceptions
Type | Condition |
---|---|
ParseException | Thrown if a parsing problem occurs. |
Read(string)
Reads a KML representation of a Geometry from a string.
If any attribute names were specified during {@link KMLReader} construction, they will be stored as IDictionary<TKey, TValue> in UserData.Declaration
public Geometry Read(string kmlGeometrystring)
Parameters
Type | Name | Description |
---|---|---|
string | kmlGeometrystring | The string that specifies kml representation of geometry. |
Returns
Type | Description |
---|---|
Geometry | A |
Exceptions
Type | Condition |
---|---|
ParseException | Thrown if a parsing problem occurs. |