Search Results for

    Show / Hide Table of Contents

    Class KMLReader

    Constructs Geometry objects from the OGC KML representation. Works only with KML geometry elements and may also parse attributes within these elements

    Inheritance
    object
    KMLReader
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.IO.KML
    Assembly: NetTopologySuite.dll
    Syntax
    public class KMLReader

    Constructors

    | Edit this page View Source

    KMLReader()

    Creates a reader that creates objects using the default GeometryFactory.

    Declaration
    public KMLReader()
    | Edit this page View Source

    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 Geometrys.

    | Edit this page View Source

    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 Geometrys.

    string[] attributeNames

    Names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc).

    | Edit this page View Source

    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 Source

    Read(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 Geometry

    Exceptions
    Type Condition
    ParseException

    Thrown if a parsing problem occurs.

    | Edit this page View Source

    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 Geometry

    Exceptions
    Type Condition
    ParseException

    Thrown if a parsing problem occurs.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX