Table of Contents

Class Overlays

Namespace
SpatialNET
Assembly
SpatialNET.Extensions.dll

Overlay operations (ADR 0005/0012): snap rounding to the grid size (gridSize → SpatialNET.Precision.DefaultGridSize → automatic), winding numbers with a selectable SpatialNET.FillRule, strict semantics (results are dimension-homogeneous, touch and collapse remnants are dropped). Results are valid, rings closed, shells counter-clockwise; Z and M (ADR 0015) at new vertices are interpolated on the original segment, at crossings the Z and M of the first operand apply.

public static class Overlays

Inheritance

Inherited Members

Remarks

Typed overloads return the exact result type; the general SpatialNET.IGeometry2D overload branches at run time. If the first operand is a point or multipoint, the result is a multipoint. Union and SymDifference exist only for equal dimensions.

Methods

Clip(IPolygon2D, Envelope2D, IGeometryFactory?, double?)

Clips a polygon to a rectangle (ADR 0022): the intersection with the closed rectangle. A polygon that lies completely in the rectangle is returned as a normalized copy without rounding to the grid, one that does not meet it gives an empty polygon; only where the border of the rectangle cuts, the overlay runs and the result lies on the grid. An envelope without area gives an empty polygon.

public static IPolygon2D Clip(this IPolygon2D polygon, Envelope2D envelope, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

polygon IPolygon2D

The polygon.

envelope Envelope2D

The clip rectangle.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

Exceptions

ArgumentNullException

polygon is null.

ArgumentOutOfRangeException

The envelope is invalid, or gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

Clip(IPolyline2D, Envelope2D, IGeometryFactory?, double?)

Clips a polyline to a rectangle (ADR 0022): the parts inside or on the border of the closed rectangle. A polyline that lies completely in the rectangle is returned as a copy without rounding, one that does not meet it gives an empty polyline; only where the border cuts, the overlay runs and the result lies on the grid. An envelope without area gives an empty polyline.

public static IPolyline2D Clip(this IPolyline2D line, Envelope2D envelope, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

line IPolyline2D

The polyline.

envelope Envelope2D

The clip rectangle.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Exceptions

ArgumentNullException

line is null.

ArgumentOutOfRangeException

The envelope is invalid, or gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

Clip(IMultiPoint2D, Envelope2D, IGeometryFactory?)

Clips a multipoint to a rectangle (ADR 0022): the points inside or on the border; nothing is rounded.

public static IMultiPoint2D Clip(this IMultiPoint2D multiPoint, Envelope2D envelope, IGeometryFactory? factory = null)

Parameters

multiPoint IMultiPoint2D

The multipoint.

envelope Envelope2D

The clip rectangle.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

Returns

IMultiPoint2D

Exceptions

ArgumentNullException

multiPoint is null.

ArgumentOutOfRangeException

The envelope is invalid.

InvalidOperationException

No factory available.

Clip(IGeometry2D, Envelope2D, IGeometryFactory?, double?)

Clips any geometry to a rectangle (ADR 0022). A point inside or on the border is copied, a point outside gives an empty multipoint.

public static IGeometry2D Clip(this IGeometry2D geometry, Envelope2D envelope, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

geometry IGeometry2D

The geometry.

envelope Envelope2D

The clip rectangle.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size for polygons and polylines; null = cascade (global default, otherwise automatic).

Returns

IGeometry2D

Exceptions

ArgumentNullException

geometry is null.

ArgumentOutOfRangeException

The envelope is invalid, or gridSize is not finite or not greater than 0.

NotSupportedException

geometry is not a known geometry kind.

InvalidOperationException

No factory available.

Difference(IPolygon2D, IPolygon2D, FillRule, IGeometryFactory?, double?)

The first polygon without the area of the second.

public static IPolygon2D Difference(this IPolygon2D a, IPolygon2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolygon2D

The polygon.

b IPolygon2D

The polygon to subtract.

fillRule FillRule

The fill rule for both operands; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

Difference(IPolygon2D, IPolyline2D, FillRule, IGeometryFactory?, double?)

The polygon (normalized); lines have no area that could be subtracted.

public static IPolygon2D Difference(this IPolygon2D a, IPolyline2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolygon2D

The polygon.

b IPolyline2D

The polyline.

fillRule FillRule

The fill rule of the polygon; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

Difference(IPolyline2D, IPolygon2D, FillRule, IGeometryFactory?, double?)

The parts of the line outside the polygon (boundary parts are dropped).

public static IPolyline2D Difference(this IPolyline2D a, IPolygon2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolyline2D

The polyline.

b IPolygon2D

The polygon.

fillRule FillRule

The fill rule of the polygon; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Difference(IPolyline2D, IPolyline2D, IGeometryFactory?, double?)

The parts of the first line that do not lie on the second.

public static IPolyline2D Difference(this IPolyline2D a, IPolyline2D b, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolyline2D

The polyline.

b IPolyline2D

The polyline to subtract.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Difference(IMultiPoint2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

The points that do not lie in b (interior or boundary).

public static IMultiPoint2D Difference(this IMultiPoint2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IMultiPoint2D

The multipoint.

b IGeometry2D

The other geometry.

fillRule FillRule

The fill rule, if b is a polygon.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IMultiPoint2D

Difference(IPoint2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

The point if it does not lie in b, otherwise an empty multipoint.

public static IMultiPoint2D Difference(this IPoint2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPoint2D

The point.

b IGeometry2D

The other geometry.

fillRule FillRule

The fill rule, if b is a polygon.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IMultiPoint2D

Difference(IGeometry2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

Difference of arbitrary geometries; the result has the type of a.

public static IGeometry2D Difference(this IGeometry2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IGeometry2D

The first geometry.

b IGeometry2D

The geometry to subtract.

fillRule FillRule

The fill rule for polygons; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IGeometry2D

Intersection(IPolygon2D, IPolygon2D, FillRule, IGeometryFactory?, double?)

Intersection area of two polygons.

public static IPolygon2D Intersection(this IPolygon2D a, IPolygon2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolygon2D

The first polygon.

b IPolygon2D

The second polygon.

fillRule FillRule

The fill rule for both operands; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

Intersection(IPolyline2D, IPolygon2D, FillRule, IGeometryFactory?, double?)

The parts of the line in the interior and on the boundary of the polygon.

public static IPolyline2D Intersection(this IPolyline2D a, IPolygon2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolyline2D

The polyline.

b IPolygon2D

The polygon.

fillRule FillRule

The fill rule of the polygon; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Intersection(IPolygon2D, IPolyline2D, FillRule, IGeometryFactory?, double?)

The parts of the line in the interior and on the boundary of the polygon.

public static IPolyline2D Intersection(this IPolygon2D a, IPolyline2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolygon2D

The polygon.

b IPolyline2D

The polyline.

fillRule FillRule

The fill rule of the polygon; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Intersection(IPolyline2D, IPolyline2D, IGeometryFactory?, double?)

Shared line parts (overlaps); pure crossing points are dropped under strict semantics.

public static IPolyline2D Intersection(this IPolyline2D a, IPolyline2D b, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolyline2D

The first polyline.

b IPolyline2D

The second polyline.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Intersection(IMultiPoint2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

The points that lie in b (interior or boundary).

public static IMultiPoint2D Intersection(this IMultiPoint2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IMultiPoint2D

The multipoint.

b IGeometry2D

The other geometry.

fillRule FillRule

The fill rule, if b is a polygon.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IMultiPoint2D

Intersection(IPoint2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

The point if it lies in b (interior or boundary), otherwise an empty multipoint.

public static IMultiPoint2D Intersection(this IPoint2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPoint2D

The point.

b IGeometry2D

The other geometry.

fillRule FillRule

The fill rule, if b is a polygon.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IMultiPoint2D

Intersection(IGeometry2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

Intersection of arbitrary geometries; result type by strict semantics (smallest dimension).

public static IGeometry2D Intersection(this IGeometry2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IGeometry2D

The first geometry.

b IGeometry2D

The second geometry.

fillRule FillRule

The fill rule for polygons; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IGeometry2D

MakeValid(IPolygon2D, FillRule, IGeometryFactory?, double?)

Makes a polygon valid by even-odd normalization through the overlay core (ADR 0020): rings that cross, overlap or touch dissolve, holes, islands and parts arise from the overlay, rings without area are dropped. The area of the result is the area of the input under fillRule. The result lies on the grid, also the parts that were valid before; check IsValid() first to leave valid input untouched. Non-finite coordinates are removed first.

public static IPolygon2D MakeValid(this IPolygon2D polygon, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

polygon IPolygon2D

The polygon.

fillRule FillRule

The fill rule for the rings; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

A new, valid polygon (never the input instance).

Exceptions

ArgumentNullException

polygon is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

MakeValid(IPolyline2D, IGeometryFactory?)

Makes a polyline valid: removes non-finite points and consecutive duplicate points, and drops paths with fewer than two distinct points (ADR 0020). Crossing lines are valid. Coordinates are not rounded.

public static IPolyline2D MakeValid(this IPolyline2D polyline, IGeometryFactory? factory = null)

Parameters

polyline IPolyline2D

The polyline.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

Returns

IPolyline2D

A new, valid polyline (never the input instance).

Exceptions

ArgumentNullException

polyline is null.

InvalidOperationException

No factory available.

MakeValid(IMultiPoint2D, IGeometryFactory?)

Makes a multipoint valid: removes non-finite points; duplicates stay (ADR 0020).

public static IMultiPoint2D MakeValid(this IMultiPoint2D multiPoint, IGeometryFactory? factory = null)

Parameters

multiPoint IMultiPoint2D

The multipoint.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

Returns

IMultiPoint2D

A new multipoint (never the input instance).

Exceptions

ArgumentNullException

multiPoint is null.

InvalidOperationException

No factory available.

MakeValid(IGeometry2D, FillRule, IGeometryFactory?, double?)

Makes any geometry valid (ADR 0020). A point that is not finite becomes an empty multipoint, a finite one a copy.

public static IGeometry2D MakeValid(this IGeometry2D geometry, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

geometry IGeometry2D

The geometry.

fillRule FillRule

The fill rule for polygonal input; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size for polygonal input; null = cascade (global default, otherwise automatic).

Returns

IGeometry2D

A new, valid geometry (never the input instance).

Exceptions

ArgumentNullException

geometry is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

NotSupportedException

geometry is not a known geometry kind.

InvalidOperationException

No factory available.

Polygonize(IPolyline2D, IGeometryFactory?, double?)

The areas enclosed by a polyline (ADR 0023): the lines are noded on the grid like in Union, and every bounded face of the arrangement becomes a polygon of its own (with the components of lines inside it as holes). Dangles and edges that enclose nothing are dropped; the unbounded outer face is never returned. Adjacent faces are separate polygons that share their edge; a face that touches itself at a vertex gives one polygon per lobe.

public static IReadOnlyList<IPolygon2D> Polygonize(this IPolyline2D line, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

line IPolyline2D

The polyline.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IReadOnlyList<IPolygon2D>

The faces in a deterministic order; an empty list if the lines enclose nothing.

Exceptions

ArgumentNullException

line is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

SymDifference(IPolygon2D, IPolygon2D, FillRule, IGeometryFactory?, double?)

The areas that belong to exactly one of the polygons.

public static IPolygon2D SymDifference(this IPolygon2D a, IPolygon2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolygon2D

The first polygon.

b IPolygon2D

The second polygon.

fillRule FillRule

The fill rule for both operands; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

SymDifference(IPolyline2D, IPolyline2D, IGeometryFactory?, double?)

The line parts that belong to exactly one of the polylines.

public static IPolyline2D SymDifference(this IPolyline2D a, IPolyline2D b, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolyline2D

The first polyline.

b IPolyline2D

The second polyline.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

SymDifference(IMultiPoint2D, IMultiPoint2D, IGeometryFactory?, double?)

The points that belong to exactly one of the multipoints.

public static IMultiPoint2D SymDifference(this IMultiPoint2D a, IMultiPoint2D b, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IMultiPoint2D

The first multipoint.

b IMultiPoint2D

The second multipoint.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IMultiPoint2D

SymDifference(IGeometry2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

Symmetric difference of geometries of equal dimension.

public static IGeometry2D SymDifference(this IGeometry2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IGeometry2D

The first geometry.

b IGeometry2D

The second geometry.

fillRule FillRule

The fill rule for polygons; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IGeometry2D

Exceptions

NotSupportedException

The dimensions differ.

Union(IPolygon2D, IPolygon2D, FillRule, IGeometryFactory?, double?)

Union of two polygons; with SpatialNET.FillRule.NonZero, e.g. overlapping shells are merged.

public static IPolygon2D Union(this IPolygon2D a, IPolygon2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolygon2D

The first polygon.

b IPolygon2D

The second polygon.

fillRule FillRule

The fill rule for both operands; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolygon2D

Union(IPolyline2D, IPolyline2D, IGeometryFactory?, double?)

Union of two polylines, noded; a path is cut where different input lines meet or end, and continues through a node only where a single input line does.

public static IPolyline2D Union(this IPolyline2D a, IPolyline2D b, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IPolyline2D

The first polyline.

b IPolyline2D

The second polyline.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IPolyline2D

Union(IMultiPoint2D, IMultiPoint2D, IGeometryFactory?, double?)

Union of two multipoints.

public static IMultiPoint2D Union(this IMultiPoint2D a, IMultiPoint2D b, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IMultiPoint2D

The first multipoint.

b IMultiPoint2D

The second multipoint.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IMultiPoint2D

Union(IGeometry2D, IGeometry2D, FillRule, IGeometryFactory?, double?)

Union of geometries of equal dimension.

public static IGeometry2D Union(this IGeometry2D a, IGeometry2D b, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

a IGeometry2D

The first geometry.

b IGeometry2D

The second geometry.

fillRule FillRule

The fill rule for polygons; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic).

Returns

IGeometry2D

Exceptions

NotSupportedException

The dimensions differ.

UnionAll(IEnumerable<IPolygon2D>, FillRule, IGeometryFactory?, double?)

Union of many polygons (ADR 0018, ADR 0047): all inputs in one overlay, on one grid. Each input is read under fillRule as in Union.

public static IPolygon2D UnionAll(this IEnumerable<IPolygon2D> polygons, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

polygons IEnumerable<IPolygon2D>

The polygons; empty ones are skipped.

fillRule FillRule

The fill rule for every input; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic from all inputs).

Returns

IPolygon2D

The union; an empty polygon for no input.

Exceptions

ArgumentNullException

polygons or one of its elements is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

UnionAll(IEnumerable<IPolyline2D>, IGeometryFactory?, double?)

Union of many polylines, noded like SpatialNET.Overlays.Union(SpatialNET.IPolyline2D,SpatialNET.IPolyline2D,SpatialNET.IGeometryFactory,System.Nullable{System.Double}): a path is cut where different input lines meet or end (ADR 0018).

public static IPolyline2D UnionAll(this IEnumerable<IPolyline2D> polylines, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

polylines IEnumerable<IPolyline2D>

The polylines; empty ones are skipped.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic from all inputs).

Returns

IPolyline2D

The union; an empty polyline for no input.

Exceptions

ArgumentNullException

polylines or one of its elements is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

UnionAll(IEnumerable<IMultiPoint2D>, IGeometryFactory?, double?)

Union of many multipoints (ADR 0018).

public static IMultiPoint2D UnionAll(this IEnumerable<IMultiPoint2D> multiPoints, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

multiPoints IEnumerable<IMultiPoint2D>

The multipoints; empty ones are skipped.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic from all inputs).

Returns

IMultiPoint2D

The union; an empty multipoint for no input.

Exceptions

ArgumentNullException

multiPoints or one of its elements is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

InvalidOperationException

No factory available.

UnionAll(IEnumerable<IGeometry2D>, FillRule, IGeometryFactory?, double?)

Union of many geometries of equal dimension (ADR 0018); points and multipoints count as one dimension, empty geometries are skipped.

public static IGeometry2D UnionAll(this IEnumerable<IGeometry2D> geometries, FillRule fillRule = FillRule.EvenOdd, IGeometryFactory? factory = null, double? gridSize = null)

Parameters

geometries IEnumerable<IGeometry2D>

The geometries.

fillRule FillRule

The fill rule for polygonal inputs; default EvenOdd.

factory IGeometryFactory?

The factory; null = SpatialNET.GeometryFactory.Default.

gridSize double?

The grid size; null = cascade (global default, otherwise automatic from all inputs).

Returns

IGeometry2D

The union; an empty polygon if there is no non-empty input.

Exceptions

ArgumentNullException

geometries or one of its elements is null.

ArgumentOutOfRangeException

gridSize is not finite or not greater than 0.

NotSupportedException

An element is of an unknown kind, or the non-empty inputs have different dimensions.

InvalidOperationException

No factory available.