Class Polygon
- Namespace
- Cratis.Geospatial
- Assembly
- Cratis.Fundamentals.dll
Represents a polygon with an outer shell and optional holes.
public record Polygon : IEquatable<Polygon>
- Inheritance
-
Polygon
- Implements
- Inherited Members
- Extension Methods
Remarks
Initializes a new instance of Polygon.
Constructors
Polygon(LinearRing, LinearRing[])
Represents a polygon with an outer shell and optional holes.
public Polygon(LinearRing Shell, LinearRing[] Holes)
Parameters
ShellLinearRingThe outer boundary of the polygon.
HolesLinearRing[]Optional inner boundaries (holes) within the polygon.
Remarks
Initializes a new instance of Polygon.
Polygon(Polygon)
protected Polygon(Polygon original)
Parameters
originalPolygon
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Holes
Optional inner boundaries (holes) within the polygon.
public LinearRing[] Holes { get; init; }
Property Value
Shell
The outer boundary of the polygon.
public LinearRing Shell { get; init; }
Property Value
Methods
Deconstruct(out LinearRing, out LinearRing[])
public void Deconstruct(out LinearRing Shell, out LinearRing[] Holes)
Parameters
ShellLinearRingHolesLinearRing[]
Equals(Polygon?)
public virtual bool Equals(Polygon? other)
Parameters
otherPolygon
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Polygon?, Polygon?)
public static bool operator ==(Polygon? left, Polygon? right)
Parameters
Returns
operator !=(Polygon?, Polygon?)
public static bool operator !=(Polygon? left, Polygon? right)