Show / Hide Table of Contents

    Class GeometryFromWKT

    Converts a Well-known Text representation to a Geometry instance.

    Inheritance
    System.Object
    GeometryFromWKT
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Mapsui.Geometries.WellKnownText
    Assembly: Mapsui.Geometries.dll
    Syntax
    public static class GeometryFromWKT
    Remarks

    The Well-Known Text (WKT) representation of Geometry is designed to exchange geometry data in ASCII form.

    Examples of WKT representations of geometry objects are:
    Geometry WKT Representation
    A PointPOINT(15 20)
    Note that point coordinates are specified with no separating comma.
    A LineString with four points:LINESTRING(0 0, 10 10, 20 25, 50 60)
    A Polygon with one exterior ring and one interior ring:POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))
    A MultiPoint with three Point values:MULTIPOINT(0 0, 20 20, 60 60)
    A MultiLineString with two LineString values:MULTILINESTRING((10 10, 20 20), (15 15, 30 15))
    A MultiPolygon with two Polygon values:MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,7 5,7 7,5 7, 5 5)))
    A GeometryCollection consisting of two Point values and one LineString:GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))

    Methods

    | Improve this Doc View Source

    Parse(TextReader)

    Converts a Well-known Text representation to a Geometry.

    Declaration
    public static Geometry Parse(TextReader reader)
    Parameters
    Type Name Description
    System.IO.TextReader reader

    A Reader which will return a Geometry Tagged Text string (see the OpenGIS Simple Features Specification)

    Returns
    Type Description
    Geometry

    Returns a Geometry read from StreamReader. An exception will be thrown if there is a parsing problem.

    | Improve this Doc View Source

    Parse(String)

    Converts a Well-known text representation to a Geometry.

    Declaration
    public static Geometry Parse(string wellKnownText)
    Parameters
    Type Name Description
    System.String wellKnownText

    A Geometry tagged text string ( see the OpenGIS Simple Features Specification.

    Returns
    Type Description
    Geometry

    Returns a Geometry specified by wellKnownText. Throws an exception if there is a parsing problem.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX