Table of Contents

Class HonuaFeatureReprojector

Namespace
Honua.Sdk.Geometry
Assembly
Honua.Sdk.Geometry.dll

Reprojects NetTopologySuite query geometries locally when the requested output CRS differs from the returned one.

public sealed class HonuaFeatureReprojector
Inheritance
HonuaFeatureReprojector
Inherited Members

Constructors

HonuaFeatureReprojector(HonuaCoordinateTransformer?)

Initializes a new instance of the HonuaFeatureReprojector class.

public HonuaFeatureReprojector(HonuaCoordinateTransformer? transformer = null)

Parameters

transformer HonuaCoordinateTransformer

Optional coordinate transformer; a default ProjNET-backed one is used when omitted.

Methods

AreEquivalent(HonuaSpatialReference?, HonuaSpatialReference?)

Determines whether a returned spatial reference already matches the requested output CRS, in which case no reprojection is required.

public static bool AreEquivalent(HonuaSpatialReference? returnedSpatialReference, HonuaSpatialReference? targetSpatialReference)

Parameters

returnedSpatialReference HonuaSpatialReference

The spatial reference the data is expressed in.

targetSpatialReference HonuaSpatialReference

The requested output spatial reference.

Returns

bool

true when no reprojection is needed.

Reproject(Geometry, HonuaSpatialReference, HonuaSpatialReference)

Reprojects a single geometry from its returned spatial reference to the requested output CRS.

public Geometry Reproject(Geometry geometry, HonuaSpatialReference returnedSpatialReference, HonuaSpatialReference targetSpatialReference)

Parameters

geometry Geometry

The geometry to reproject.

returnedSpatialReference HonuaSpatialReference

The spatial reference the geometry is currently expressed in.

targetSpatialReference HonuaSpatialReference

The requested output spatial reference.

Returns

Geometry

The geometry expressed in targetSpatialReference. When the source and target are equivalent the input instance is returned unchanged.

Reproject(IEnumerable<Geometry?>, HonuaSpatialReference, HonuaSpatialReference)

Reprojects a sequence of geometries from their returned spatial reference to the requested CRS.

public IReadOnlyList<Geometry?> Reproject(IEnumerable<Geometry?> geometries, HonuaSpatialReference returnedSpatialReference, HonuaSpatialReference targetSpatialReference)

Parameters

geometries IEnumerable<Geometry>

The geometries to reproject (null entries are passed through).

returnedSpatialReference HonuaSpatialReference

The spatial reference the geometries are expressed in.

targetSpatialReference HonuaSpatialReference

The requested output spatial reference.

Returns

IReadOnlyList<Geometry>

The reprojected geometries in the same order. A no-op when source and target match.