Show / Hide Table of Contents

    Class GeometryCollection

    A GeometryCollection is a geometry that is a collection of 1 or more geometries.

    Inheritance
    System.Object
    Geometry
    GeometryCollection
    MultiLineString
    MultiPoint
    Implements
    System.IEquatable<Geometry>
    IGeometryCollection
    IGeometry
    System.Collections.Generic.IEnumerable<Geometry>
    System.Collections.IEnumerable
    Inherited Members
    Geometry.Envelope
    Geometry.AsText()
    Geometry.AsBinary()
    Geometry.ToString()
    Geometry.GeomFromText(String)
    Geometry.GeomFromWKB(Byte[])
    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 class GeometryCollection : Geometry, IEquatable<Geometry>, IGeometryCollection, IGeometry, IEnumerable<Geometry>, IEnumerable
    Remarks

    All the elements in a GeometryCollection must be in the same Spatial Reference. This is also the Spatial Reference for the GeometryCollection.
    GeometryCollection places no other constraints on its elements. Subclasses of GeometryCollection may restrict membership based on dimension and may also place other constraints on the degree of spatial overlap between elements.

    Constructors

    | Improve this Doc View Source

    GeometryCollection()

    Initializes a new GeometryCollection

    Declaration
    public GeometryCollection()

    Properties

    | Improve this Doc View Source

    BoundingBox

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

    Declaration
    public override BoundingBox BoundingBox { get; }
    Property Value
    Type Description
    BoundingBox
    Overrides
    Geometry.BoundingBox
    | Improve this Doc View Source

    Collection

    Gets or sets the GeometryCollection

    Declaration
    public IList<Geometry> Collection { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<Geometry>
    | Improve this Doc View Source

    Item[Int32]

    Returns an indexed geometry in the collection

    Declaration
    public Geometry this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    Geometry index

    Property Value
    Type Description
    Geometry

    Geometry

    | Improve this Doc View Source

    NumGeometries

    Gets the number of geometries in the collection.

    Declaration
    public virtual int NumGeometries { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Clone()

    Declaration
    public GeometryCollection Clone()
    Returns
    Type Description
    GeometryCollection
    | Improve this Doc View Source

    Contains(Point)

    Declaration
    public override bool Contains(Point point)
    Parameters
    Type Name Description
    Point point
    Returns
    Type Description
    System.Boolean
    Overrides
    Geometry.Contains(Point)
    | 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 override double Distance(Point point)
    Parameters
    Type Name Description
    Point point

    Geometry to calculate distance to

    Returns
    Type Description
    System.Double

    Shortest distance between any two points in the two geometries

    Overrides
    Geometry.Distance(Point)
    | Improve this Doc View Source

    Equals(Geometry)

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

    Equals(GeometryCollection)

    Determines whether this GeometryCollection is spatially equal to the GeometryCollection 'g'

    Declaration
    public bool Equals(GeometryCollection g)
    Parameters
    Type Name Description
    GeometryCollection g
    Returns
    Type Description
    System.Boolean

    True if the GeometryCollections are equals

    | Improve this Doc View Source

    Geometry(Int32)

    Returns an indexed geometry in the collection

    Declaration
    public virtual Geometry Geometry(int n)
    Parameters
    Type Name Description
    System.Int32 n

    Geometry index

    Returns
    Type Description
    Geometry

    Geometry at index N

    | 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

    GetEnumerator()

    Gets an enumerator for enumerating the geometries in the GeometryCollection

    Declaration
    public virtual IEnumerator<Geometry> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<Geometry>
    | 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
    Geometry.GetHashCode()
    | Improve this Doc View Source

    IsEmpty()

    Returns empty of all the geometries are empty or the collection is empty

    Declaration
    public override bool IsEmpty()
    Returns
    Type Description
    System.Boolean

    true of collection is empty

    Overrides
    Geometry.IsEmpty()

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Gets an enumerator for enumerating the geometries in the GeometryCollection

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    System.IEquatable<T>
    IGeometryCollection
    IGeometry
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Extension Methods

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