Table of Contents

Class Relations

Namespace
SpatialNET
Assembly
SpatialNET.Extensions.dll

Spatial predicates based on DE-9IM (ADR 0013): exact on the input coordinates, without a grid. Areas by even-odd (ADR 0003), line boundaries by mod-2. If a geometry is empty, only SpatialNET.Relations.Disjoint(SpatialNET.IGeometry2D,SpatialNET.IGeometry2D) is true. Invalid input is handled deterministically and without exceptions, but without any guarantee of mutual consistency.

public static class Relations

Inheritance

Inherited Members

Methods

Contains(IGeometry2D, IGeometry2D)

Whether b lies in a and they share an interior (T*****FF*).

public static bool Contains(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

CoveredBy(IGeometry2D, IGeometry2D)

Whether no point of a lies outside b; boundary points count.

public static bool CoveredBy(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Covers(IGeometry2D, IGeometry2D)

Whether no point of b lies outside a; boundary points count.

public static bool Covers(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Crosses(IGeometry2D, IGeometry2D)

Whether the geometries "cross" (OGC; depends on the dimensions).

public static bool Crosses(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Disjoint(IGeometry2D, IGeometry2D)

Whether the geometries share no point (FFFF***); true if one is empty.

public static bool Disjoint(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

EqualsTopo(IGeometry2D, IGeometry2D)

Whether the geometries are topologically equal (TF**FFF); false if one is empty.

public static bool EqualsTopo(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Intersects(IGeometry2D, IGeometry2D)

Whether the geometries meet in at least one point.

public static bool Intersects(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Overlaps(IGeometry2D, IGeometry2D)

Whether geometries of equal dimension partly overlap.

public static bool Overlaps(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Relate(IGeometry2D, IGeometry2D)

The DE-9IM intersection matrix of a and b.

public static IntersectionMatrix Relate(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D

The first geometry.

b IGeometry2D

The second geometry.

Returns

IntersectionMatrix

Exceptions

ArgumentNullException

A geometry is null.

NotSupportedException

A geometry is not a known geometry kind.

Relate(IGeometry2D, IGeometry2D, string)

Whether the intersection matrix matches the DE-9IM pattern.

public static bool Relate(this IGeometry2D a, IGeometry2D b, string pattern)

Parameters

a IGeometry2D

The first geometry.

b IGeometry2D

The second geometry.

pattern string

The pattern of 9 characters (T F * 0 1 2).

Returns

bool

Touches(IGeometry2D, IGeometry2D)

Whether the geometries meet only in boundary points.

public static bool Touches(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool

Within(IGeometry2D, IGeometry2D)

Whether a lies in b (TFF).

public static bool Within(this IGeometry2D a, IGeometry2D b)

Parameters

a IGeometry2D
b IGeometry2D

Returns

bool