Class GeometryMapper
Methods to map various collections of Geometrys via defined mapping functions.
Inherited Members
Namespace: NetTopologySuite.Geometries.Utilities
Assembly: NetTopologySuite.dll
Syntax
public class GeometryMapper
Methods
| Edit this page View SourceFlatMap(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.
Declaration
public static Geometry FlatMap(Geometry geom, Dimension emptyDim, GeometryMapper.IMapOp op)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geom | The geometry to map |
| Dimension | emptyDim | The dimension of empy geometry to create |
| GeometryMapper.IMapOp | op | The mapping operation |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
public static Geometry Map(Geometry geom, GeometryMapper.IMapOp op)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geom | The input atomic or composite geometry |
| GeometryMapper.IMapOp | op | The mapping operation |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
public static Geometry Map(Geometry geom, Func<Geometry, Geometry> op)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geom | The input atomic or composite geometry |
| Func<Geometry, Geometry> | op | The mapping operation delegate |
Returns
| Type | Description |
|---|---|
| Geometry | A result collection or geometry of most specific type |
Map(IEnumerable<Geometry>, IMapOp)
Declaration
public static ReadOnlyCollection<Geometry> Map(IEnumerable<Geometry> geoms, GeometryMapper.IMapOp op)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Geometry> | geoms | |
| GeometryMapper.IMapOp | op |
Returns
| Type | Description |
|---|---|
| ReadOnlyCollection<Geometry> |