Class ImpGeometryFactory
- Namespace
- SpatialNET.Imp
- Assembly
- SpatialNET.Imp.dll
The geometry factory of the reference implementation. Stateless and therefore thread-safe; all coordinates are copied into new, immutable objects.
public sealed class ImpGeometryFactory : IGeometryFactoryInheritance
Implements
Inherited Members
Constructors
ImpGeometryFactory(bool, bool)
The geometry factory of the reference implementation. Stateless and therefore thread-safe; all coordinates are copied into new, immutable objects.
public ImpGeometryFactory(bool supportsZ, bool supportsM)Parameters
supportsZbool-
Whether coordinates with a height are created as SpatialNET.Imp.Point3D. If
false, no Z is created. supportsMbool-
Whether coordinates with a measure are created as SpatialNET.Imp.PointM or SpatialNET.Imp.Point3DM (ADR 0015). If
false, no M is created.
ImpGeometryFactory(bool)
Creates a factory with the given Z support and with M support.
public ImpGeometryFactory(bool supportsZ = true)Parameters
supportsZbool-
Whether Z is created.
Properties
Instance
A shared instance with Z and M support.
public static ImpGeometryFactory Instance { get; }Property Value
SupportsM
Whether the created geometries are meant to carry M (ADR 0015). The default is false,
so that existing host factories keep compiling and receive no M.
public bool SupportsM { get; }Property Value
SupportsZ
Whether the created geometries are meant to carry Z.
public bool SupportsZ { get; }Property Value
Methods
CreateMultiPoint(ReadOnlySpan<Coordinate>, IGeometry2D?)
Creates a multipoint; an empty one if there are no coordinates.
public IMultiPoint2D CreateMultiPoint(ReadOnlySpan<Coordinate> coordinates, IGeometry2D? source)Parameters
coordinatesReadOnlySpan<Coordinate>-
The points.
sourceIGeometry2D?-
The primary input geometry or
null.
Returns
CreatePoint(Coordinate, IGeometry2D?)
Creates a point.
public IPoint2D CreatePoint(Coordinate coordinate, IGeometry2D? source)Parameters
coordinateCoordinate-
The coordinate.
sourceIGeometry2D?-
The primary input geometry or
null.
Returns
CreatePolygon(ReadOnlySpan<PolygonPart>, IGeometry2D?)
Creates a polygon from parts; an empty one if there are no parts.
public IPolygon2D CreatePolygon(ReadOnlySpan<PolygonPart> parts, IGeometry2D? source)Parameters
partsReadOnlySpan<PolygonPart>-
The parts (valid, closed, shell counter-clockwise).
sourceIGeometry2D?-
The primary input geometry or
null.
Returns
CreatePolyline(ReadOnlySpan<ReadOnlyMemory<Coordinate>>, IGeometry2D?)
Creates a polyline; an empty one if there are no paths.
public IPolyline2D CreatePolyline(ReadOnlySpan<ReadOnlyMemory<Coordinate>> paths, IGeometry2D? source)Parameters
pathsReadOnlySpan<ReadOnlyMemory<Coordinate>>-
The paths as coordinate sequences.
sourceIGeometry2D?-
The primary input geometry or
null.