Class GeometryCollection
- Namespace
- NetTopologySuite.Geometries
- Assembly
- NetTopologySuite.dll
Basic implementation of GeometryCollection.
public class GeometryCollection : Geometry, IComparable, IComparable<Geometry>, IEnumerable<Geometry>, IEnumerable
- Inheritance
-
GeometryCollection
- Implements
- Derived
- Inherited Members
Constructors
GeometryCollection(Geometry[])
public GeometryCollection(Geometry[] geometries)
Parameters
geometriesGeometry[]The
Geometrys for thisGeometryCollection, ornullor an empty array to create the empty point. Elements may be emptyGeometrys, but notnulls.
Remarks
For create this Geometry is used a standard GeometryFactory
with PrecisionModel == Floating.
GeometryCollection(Geometry[], GeometryFactory)
public GeometryCollection(Geometry[] geometries, GeometryFactory factory)
Parameters
geometriesGeometry[]The
Geometrys for thisGeometryCollection, ornullor an empty array to create the empty point. Elements may be emptyGeometrys, but notnulls.factoryGeometryFactory
Fields
Empty
Represents an empty GeometryCollection.
public static readonly GeometryCollection Empty
Field Value
Properties
Area
Returns the area of this GeometryCollection.
public override double Area { get; }
Property Value
Boundary
public override Geometry Boundary { get; }
Property Value
BoundaryDimension
public override Dimension BoundaryDimension { get; }
Property Value
Coordinate
public override Coordinate Coordinate { get; }
Property Value
Coordinates
Collects all coordinates of all subgeometries into an Array. Note that while changes to the coordinate objects themselves may modify the Geometries in place, the returned Array as such is only a temporary container which is not synchronized back.
public override Coordinate[] Coordinates { get; }
Property Value
- Coordinate[]
The collected coordinates.
Count
Returns the number of geometries contained by this GeometryCollection.
public int Count { get; }
Property Value
Dimension
public override Dimension Dimension { get; }
Property Value
Geometries
public Geometry[] Geometries { get; protected set; }
Property Value
- Geometry[]
GeometryType
Returns the name of this object's interface.
public override string GeometryType { get; }
Property Value
- string
"GeometryCollection"
IsEmpty
public override bool IsEmpty { get; }
Property Value
IsHomogeneous
Return true if all features in collection are of the same type.
public bool IsHomogeneous { get; }
Property Value
this[int]
Returns the iTh element in the collection.
public Geometry this[int i] { get; }
Parameters
iint
Property Value
Length
Returns the length of this GeometryCollection.
public override double Length { get; }
Property Value
NumGeometries
public override int NumGeometries { get; }
Property Value
NumPoints
public override int NumPoints { get; }
Property Value
OgcGeometryType
Gets the OGC geometry type
public override OgcGeometryType OgcGeometryType { get; }
Property Value
SortIndex
Gets a value to sort the geometry
protected override Geometry.SortIndexValue SortIndex { get; }
Property Value
Remarks
NOTE:
For JTS v1.17 this property's getter has been renamed to getTypeCode().
In order not to break binary compatibility we did not follow.
Methods
Apply(ICoordinateFilter)
public override void Apply(ICoordinateFilter filter)
Parameters
filterICoordinateFilter
Apply(ICoordinateSequenceFilter)
public override void Apply(ICoordinateSequenceFilter filter)
Parameters
filterICoordinateSequenceFilter
Apply(IEntireCoordinateSequenceFilter)
public override void Apply(IEntireCoordinateSequenceFilter filter)
Parameters
Apply(IGeometryComponentFilter)
public override void Apply(IGeometryComponentFilter filter)
Parameters
filterIGeometryComponentFilter
Apply(IGeometryFilter)
public override void Apply(IGeometryFilter filter)
Parameters
filterIGeometryFilter
CompareToSameClass(object)
protected override int CompareToSameClass(object o)
Parameters
oobject
Returns
CompareToSameClass(object, IComparer<CoordinateSequence>)
protected override int CompareToSameClass(object o, IComparer<CoordinateSequence> comp)
Parameters
oobjectcompIComparer<CoordinateSequence>
Returns
ComputeEnvelopeInternal()
protected override Envelope ComputeEnvelopeInternal()
Returns
CopyInternal()
protected override Geometry CopyInternal()
Returns
EqualsExact(Geometry, double)
public override bool EqualsExact(Geometry other, double tolerance)
Parameters
Returns
GetEnumerator()
public IEnumerator<Geometry> GetEnumerator()
Returns
GetGeometryN(int)
public override Geometry GetGeometryN(int n)
Parameters
nint
Returns
GetOrdinates(Ordinate)
public override double[] GetOrdinates(Ordinate ordinate)
Parameters
ordinateOrdinate
Returns
- double[]
Normalize()
public override void Normalize()
Reverse()
Creates a GeometryCollection with every component reversed. The order of the components in the collection are not reversed.
[Obsolete("Call Geometry.Reverse()")]
public override Geometry Reverse()
Returns
ReverseInternal()
The actual implementation of the Reverse() function for GeometryCollections.
protected override Geometry ReverseInternal()
Returns
- Geometry
A reversed geometry