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

Shell LinearRing

The outer boundary of the polygon.

Holes LinearRing[]

Optional inner boundaries (holes) within the polygon.

Remarks

Initializes a new instance of Polygon.

Polygon(Polygon)

protected Polygon(Polygon original)

Parameters

original Polygon

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Holes

Optional inner boundaries (holes) within the polygon.

public LinearRing[] Holes { get; init; }

Property Value

LinearRing[]

Shell

The outer boundary of the polygon.

public LinearRing Shell { get; init; }

Property Value

LinearRing

Methods

Deconstruct(out LinearRing, out LinearRing[])

public void Deconstruct(out LinearRing Shell, out LinearRing[] Holes)

Parameters

Shell LinearRing
Holes LinearRing[]

Equals(Polygon?)

public virtual bool Equals(Polygon? other)

Parameters

other Polygon

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Polygon?, Polygon?)

public static bool operator ==(Polygon? left, Polygon? right)

Parameters

left Polygon
right Polygon

Returns

bool

operator !=(Polygon?, Polygon?)

public static bool operator !=(Polygon? left, Polygon? right)

Parameters

left Polygon
right Polygon

Returns

bool