Show / Hide Table of Contents

    Class Geometry

    Geometry is the root class of the Geometry Object Model hierarchy. Geometry is an abstract (non-instantiable) class.

    Inheritance
    System.Object
    Geometry
    GeometryCollection
    LineString
    MultiPolygon
    Point
    Polygon
    Raster
    Implements
    IGeometry
    System.IEquatable<Geometry>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Mapsui.Geometries
    Assembly: Mapsui.Geometries.dll
    Syntax
    public abstract class Geometry : IGeometry, IEquatable<Geometry>
    Remarks

    The instantiable subclasses of Geometry defined in the specification are restricted to 0, 1 and twodimensional geometric objects that exist in two-dimensional coordinate space (R^2).

    All instantiable geometry classes described in this specification are defined so that valid instances of a geometry class are topologically closed (i.e. all defined geometries include their boundary).

    Properties

    | Improve this Doc View Source

    BoundingBox

    The minimum bounding box for this Geometry, returned as a BoundingBox.

    Declaration
    public abstract BoundingBox BoundingBox { get; }
    Property Value
    Type Description
    BoundingBox
    | Improve this Doc View Source

    Envelope

    The minimum bounding box for this Geometry, returned as a Geometry. The polygon is defined by the corner points of the bounding box ((MINX, MINY), (MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)).

    Declaration
    public Geometry Envelope { get; }
    Property Value
    Type Description
    Geometry
    Remarks

    The envelope is actually the BoundingBox converted into a polygon.

    See Also
    BoundingBox

    Methods

    | Improve this Doc View Source

    AsBinary()

    Exports this Geometry to a specific well-known binary representation of Geometry.

    Declaration
    public byte[] AsBinary()
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    AsText()

    Exports this Geometry to a specific well-known text representation of Geometry.

    Declaration
    public string AsText()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Clone()

    This method must be overridden using 'public new [derived_data_type] Clone()'

    Declaration
    public Geometry Clone()
    Returns
    Type Description
    Geometry

    Copy of Geometry

    | Improve this Doc View Source

    Contains(Point)

    Declaration
    public abstract bool Contains(Point point)
    Parameters
    Type Name Description
    Point point
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Distance(Point)

    Returns the shortest distance between any two points in the two geometries as calculated in the spatial reference system of this Geometry.

    Declaration
    public abstract double Distance(Point point)
    Parameters
    Type Name Description
    Point point
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    Equals(Geometry)

    Declaration
    public abstract bool Equals(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GeomFromText(String)

    Creates a Geometry based on a WellKnownText string

    Declaration
    public static Geometry GeomFromText(string wkt)
    Parameters
    Type Name Description
    System.String wkt

    Well-known Text

    Returns
    Type Description
    Geometry
    | Improve this Doc View Source

    GeomFromWKB(Byte[])

    Creates a Geometry based on a WellKnownBinary byte array

    Declaration
    public static Geometry GeomFromWKB(byte[] wkb)
    Parameters
    Type Name Description
    System.Byte[] wkb

    Well-known Binary

    Returns
    Type Description
    Geometry
    | Improve this Doc View Source

    GetBoundingBox()

    Declaration
    [Obsolete("Use the BoundingBox field instead")]
    public BoundingBox GetBoundingBox()
    Returns
    Type Description
    BoundingBox
    | Improve this Doc View Source

    GetHashCode()

    Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current GetHashCode().

    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    IsEmpty()

    Returns 'true' if this Geometry is the empty geometry . If true, then this Geometry represents the empty point set, Ø, for the coordinate space.

    Declaration
    public abstract bool IsEmpty()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ToString()

    Returns a WellKnownText representation of the Geometry

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    Well-known text

    Overrides
    System.Object.ToString()

    Implements

    IGeometry
    System.IEquatable<T>

    Extension Methods

    GeometryExtensions.Copy(IGeometry)
    GeometryIterator.AllVertices(IGeometry)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX