Table of Contents

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 : IGeometryFactory

Inheritance

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

supportsZ bool

Whether coordinates with a height are created as SpatialNET.Imp.Point3D. If false, no Z is created.

supportsM bool

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

supportsZ bool

Whether Z is created.

Properties

Instance

A shared instance with Z and M support.

public static ImpGeometryFactory Instance { get; }

Property Value

ImpGeometryFactory

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

bool

SupportsZ

Whether the created geometries are meant to carry Z.

public bool SupportsZ { get; }

Property Value

bool

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

coordinates ReadOnlySpan<Coordinate>

The points.

source IGeometry2D?

The primary input geometry or null.

Returns

IMultiPoint2D

CreatePoint(Coordinate, IGeometry2D?)

Creates a point.

public IPoint2D CreatePoint(Coordinate coordinate, IGeometry2D? source)

Parameters

coordinate Coordinate

The coordinate.

source IGeometry2D?

The primary input geometry or null.

Returns

IPoint2D

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

parts ReadOnlySpan<PolygonPart>

The parts (valid, closed, shell counter-clockwise).

source IGeometry2D?

The primary input geometry or null.

Returns

IPolygon2D

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

paths ReadOnlySpan<ReadOnlyMemory<Coordinate>>

The paths as coordinate sequences.

source IGeometry2D?

The primary input geometry or null.

Returns

IPolyline2D