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
geometries
Geometry[]The
Geometry
s for thisGeometryCollection
, ornull
or an empty array to create the empty point. Elements may be emptyGeometry
s, but notnull
s.
Remarks
For create this Geometry is used a standard GeometryFactory
with PrecisionModel ==
Floating.
GeometryCollection(Geometry[], GeometryFactory)
public GeometryCollection(Geometry[] geometries, GeometryFactory factory)
Parameters
geometries
Geometry[]The
Geometry
s for thisGeometryCollection
, ornull
or an empty array to create the empty point. Elements may be emptyGeometry
s, but notnull
s.factory
GeometryFactory
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
i
int
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
filter
ICoordinateFilter
Apply(ICoordinateSequenceFilter)
public override void Apply(ICoordinateSequenceFilter filter)
Parameters
filter
ICoordinateSequenceFilter
Apply(IEntireCoordinateSequenceFilter)
public override void Apply(IEntireCoordinateSequenceFilter filter)
Parameters
Apply(IGeometryComponentFilter)
public override void Apply(IGeometryComponentFilter filter)
Parameters
filter
IGeometryComponentFilter
Apply(IGeometryFilter)
public override void Apply(IGeometryFilter filter)
Parameters
filter
IGeometryFilter
CompareToSameClass(object)
protected override int CompareToSameClass(object o)
Parameters
o
object
Returns
CompareToSameClass(object, IComparer<CoordinateSequence>)
protected override int CompareToSameClass(object o, IComparer<CoordinateSequence> comp)
Parameters
o
objectcomp
IComparer<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
n
int
Returns
GetOrdinates(Ordinate)
public override double[] GetOrdinates(Ordinate ordinate)
Parameters
ordinate
Ordinate
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 GeometryCollection
s.
protected override Geometry ReverseInternal()
Returns
- Geometry
A reversed geometry