Class HonuaFeatureReprojector
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
transformerHonuaCoordinateTransformerOptional 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
returnedSpatialReferenceHonuaSpatialReferenceThe spatial reference the data is expressed in.
targetSpatialReferenceHonuaSpatialReferenceThe requested output spatial reference.
Returns
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
geometryGeometryThe geometry to reproject.
returnedSpatialReferenceHonuaSpatialReferenceThe spatial reference the geometry is currently expressed in.
targetSpatialReferenceHonuaSpatialReferenceThe 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
geometriesIEnumerable<Geometry>The geometries to reproject (null entries are passed through).
returnedSpatialReferenceHonuaSpatialReferenceThe spatial reference the geometries are expressed in.
targetSpatialReferenceHonuaSpatialReferenceThe requested output spatial reference.
Returns
- IReadOnlyList<Geometry>
The reprojected geometries in the same order. A no-op when source and target match.