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 OverlaysInheritance
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
polygonIPolygon2D-
The polygon.
envelopeEnvelope2D-
The clip rectangle.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
Exceptions
- ArgumentNullException
-
polygonisnull. - ArgumentOutOfRangeException
-
The envelope is invalid, or
gridSizeis 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
lineIPolyline2D-
The polyline.
envelopeEnvelope2D-
The clip rectangle.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
Exceptions
- ArgumentNullException
-
lineisnull. - ArgumentOutOfRangeException
-
The envelope is invalid, or
gridSizeis 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
multiPointIMultiPoint2D-
The multipoint.
envelopeEnvelope2D-
The clip rectangle.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default.
Returns
Exceptions
- ArgumentNullException
-
multiPointisnull. - 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
geometryIGeometry2D-
The geometry.
envelopeEnvelope2D-
The clip rectangle.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size for polygons and polylines;
null= cascade (global default, otherwise automatic).
Returns
Exceptions
- ArgumentNullException
-
geometryisnull. - ArgumentOutOfRangeException
-
The envelope is invalid, or
gridSizeis not finite or not greater than 0. - NotSupportedException
-
geometryis 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
aIPolygon2D-
The polygon.
bIPolygon2D-
The polygon to subtract.
fillRuleFillRule-
The fill rule for both operands; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolygon2D-
The polygon.
bIPolyline2D-
The polyline.
fillRuleFillRule-
The fill rule of the polygon; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolyline2D-
The polyline.
bIPolygon2D-
The polygon.
fillRuleFillRule-
The fill rule of the polygon; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolyline2D-
The polyline.
bIPolyline2D-
The polyline to subtract.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIMultiPoint2D-
The multipoint.
bIGeometry2D-
The other geometry.
fillRuleFillRule-
The fill rule, if
bis a polygon. factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPoint2D-
The point.
bIGeometry2D-
The other geometry.
fillRuleFillRule-
The fill rule, if
bis a polygon. factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIGeometry2D-
The first geometry.
bIGeometry2D-
The geometry to subtract.
fillRuleFillRule-
The fill rule for polygons; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolygon2D-
The first polygon.
bIPolygon2D-
The second polygon.
fillRuleFillRule-
The fill rule for both operands; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolyline2D-
The polyline.
bIPolygon2D-
The polygon.
fillRuleFillRule-
The fill rule of the polygon; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolygon2D-
The polygon.
bIPolyline2D-
The polyline.
fillRuleFillRule-
The fill rule of the polygon; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolyline2D-
The first polyline.
bIPolyline2D-
The second polyline.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIMultiPoint2D-
The multipoint.
bIGeometry2D-
The other geometry.
fillRuleFillRule-
The fill rule, if
bis a polygon. factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPoint2D-
The point.
bIGeometry2D-
The other geometry.
fillRuleFillRule-
The fill rule, if
bis a polygon. factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIGeometry2D-
The first geometry.
bIGeometry2D-
The second geometry.
fillRuleFillRule-
The fill rule for polygons; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
polygonIPolygon2D-
The polygon.
fillRuleFillRule-
The fill rule for the rings; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
- IPolygon2D
-
A new, valid polygon (never the input instance).
Exceptions
- ArgumentNullException
-
polygonisnull. - ArgumentOutOfRangeException
-
gridSizeis 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
polylineIPolyline2D-
The polyline.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default.
Returns
- IPolyline2D
-
A new, valid polyline (never the input instance).
Exceptions
- ArgumentNullException
-
polylineisnull. - 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
multiPointIMultiPoint2D-
The multipoint.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default.
Returns
- IMultiPoint2D
-
A new multipoint (never the input instance).
Exceptions
- ArgumentNullException
-
multiPointisnull. - 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
geometryIGeometry2D-
The geometry.
fillRuleFillRule-
The fill rule for polygonal input; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size for polygonal input;
null= cascade (global default, otherwise automatic).
Returns
- IGeometry2D
-
A new, valid geometry (never the input instance).
Exceptions
- ArgumentNullException
-
geometryisnull. - ArgumentOutOfRangeException
-
gridSizeis not finite or not greater than 0. - NotSupportedException
-
geometryis 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
lineIPolyline2D-
The polyline.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
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
-
lineisnull. - ArgumentOutOfRangeException
-
gridSizeis 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
aIPolygon2D-
The first polygon.
bIPolygon2D-
The second polygon.
fillRuleFillRule-
The fill rule for both operands; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolyline2D-
The first polyline.
bIPolyline2D-
The second polyline.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIMultiPoint2D-
The first multipoint.
bIMultiPoint2D-
The second multipoint.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIGeometry2D-
The first geometry.
bIGeometry2D-
The second geometry.
fillRuleFillRule-
The fill rule for polygons; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolygon2D-
The first polygon.
bIPolygon2D-
The second polygon.
fillRuleFillRule-
The fill rule for both operands; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIPolyline2D-
The first polyline.
bIPolyline2D-
The second polyline.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIMultiPoint2D-
The first multipoint.
bIMultiPoint2D-
The second multipoint.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
aIGeometry2D-
The first geometry.
bIGeometry2D-
The second geometry.
fillRuleFillRule-
The fill rule for polygons; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic).
Returns
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
polygonsIEnumerable<IPolygon2D>-
The polygons; empty ones are skipped.
fillRuleFillRule-
The fill rule for every input; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic from all inputs).
Returns
- IPolygon2D
-
The union; an empty polygon for no input.
Exceptions
- ArgumentNullException
-
polygonsor one of its elements isnull. - ArgumentOutOfRangeException
-
gridSizeis 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
polylinesIEnumerable<IPolyline2D>-
The polylines; empty ones are skipped.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic from all inputs).
Returns
- IPolyline2D
-
The union; an empty polyline for no input.
Exceptions
- ArgumentNullException
-
polylinesor one of its elements isnull. - ArgumentOutOfRangeException
-
gridSizeis 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
multiPointsIEnumerable<IMultiPoint2D>-
The multipoints; empty ones are skipped.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
The grid size;
null= cascade (global default, otherwise automatic from all inputs).
Returns
- IMultiPoint2D
-
The union; an empty multipoint for no input.
Exceptions
- ArgumentNullException
-
multiPointsor one of its elements isnull. - ArgumentOutOfRangeException
-
gridSizeis 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
geometriesIEnumerable<IGeometry2D>-
The geometries.
fillRuleFillRule-
The fill rule for polygonal inputs; default EvenOdd.
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. gridSizedouble?-
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
-
geometriesor one of its elements isnull. - ArgumentOutOfRangeException
-
gridSizeis 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.