Table of Contents

Class ListViews

Namespace
SpatialNET
Assembly
SpatialNET.Extensions.dll

List views of point sequences, polylines and polygons for LINQ and foreach (ADR 0002).

public static class ListViews

Inheritance

Inherited Members

Remarks

If the geometry already implements the matching System.Collections.Generic.IReadOnlyList`1, it is returned directly; otherwise a lean, copy-free view that accesses the indexer is created.

Methods

AsList(IPointCollection2D)

The points as a list.

public static IReadOnlyList<IPoint2D> AsList(this IPointCollection2D points)

Parameters

points IPointCollection2D

A path, ring or multipoint.

Returns

IReadOnlyList<IPoint2D>

Exceptions

ArgumentNullException

points is null.

AsList(IPolyline2D)

The paths as a list.

public static IReadOnlyList<IPath2D> AsList(this IPolyline2D polyline)

Parameters

polyline IPolyline2D

The polyline.

Returns

IReadOnlyList<IPath2D>

Exceptions

ArgumentNullException

polyline is null.

AsList(IPolygon2D)

The rings as a list.

public static IReadOnlyList<IRing2D> AsList(this IPolygon2D polygon)

Parameters

polygon IPolygon2D

The polygon.

Returns

IReadOnlyList<IRing2D>

Exceptions

ArgumentNullException

polygon is null.