Table of Contents

Class GeometryMapper

Namespace
NetTopologySuite.Geometries.Utilities
Assembly
NetTopologySuite.dll

Methods to map various collections of Geometrys via defined mapping functions.

public class GeometryMapper
Inheritance
GeometryMapper
Inherited Members

Constructors

GeometryMapper()

public GeometryMapper()

Methods

FlatMap(Geometry, Dimension, IMapOp)

Maps the atomic elements of a Geometry (which may be atomic or composite) using a GeometryMapper.IMapOp mapping operation into an atomic Geometry or a flat collection of the most specific type. null and empty values returned from the mapping operation are discarded.

public static Geometry FlatMap(Geometry geom, Dimension emptyDim, GeometryMapper.IMapOp op)

Parameters

geom Geometry

The geometry to map

emptyDim Dimension

The dimension of empy geometry to create

op GeometryMapper.IMapOp

The mapping operation

Returns

Geometry

The mapped result

Map(Geometry, IMapOp)

Maps the members of a Geometry (which may be atomic or composite) into another Geometry of most specific type. null results are skipped. In the case of hierarchical GeometryCollections, only the first level of members are mapped.

public static Geometry Map(Geometry geom, GeometryMapper.IMapOp op)

Parameters

geom Geometry

The input atomic or composite geometry

op GeometryMapper.IMapOp

The mapping operation

Returns

Geometry

A result collection or geometry of most specific type

Map(Geometry, Func<Geometry, Geometry>)

Maps the members of a Geometry (which may be atomic or composite) into another Geometry of most specific type. null results are skipped. In the case of hierarchical GeometryCollections, only the first level of members are mapped.

public static Geometry Map(Geometry geom, Func<Geometry, Geometry> op)

Parameters

geom Geometry

The input atomic or composite geometry

op Func<Geometry, Geometry>

The mapping operation delegate

Returns

Geometry

A result collection or geometry of most specific type

Map(IEnumerable<Geometry>, IMapOp)

public static ReadOnlyCollection<Geometry> Map(IEnumerable<Geometry> geoms, GeometryMapper.IMapOp op)

Parameters

geoms IEnumerable<Geometry>
op GeometryMapper.IMapOp

Returns

ReadOnlyCollection<Geometry>