Namespace NetTopologySuite.Geometries.Utilities
Provides classes that parse and modify Geometry objects.
Classes
AffineTransformation
Represents an affine transformation on the 2D Cartesian plane.
AffineTransformationBuilder
Builds an AffineTransformation defined by a set of control vectors.
AffineTransformationFactory
Supports creating AffineTransformations defined by various kinds of inputs and transformation mapping rules.
ComponentCoordinateExtracter
Extracts a representative Coordinate from each connected component of a Geometry.
EnvelopeCombiner
Utility to combine just the Envelopes of a list of geometries.
GeometryCollectionMapper
Maps the members of a GeometryCollection into another GeometryCollection via a defined mapping function.
GeometryCombiner
Combines Geometrys to produce a GeometryCollection of the most appropriate type.
GeometryEditor
A class which supports creating new Geometrys which are modifications of existing ones, maintaining the same type structure.
GeometryEditor.CoordinateOperation
A GeometryEditorOperation which edits the coordinate list of a Geometry
.
Operates on Geometry subclasses which contains a single coordinate list.
GeometryEditor.CoordinateSequenceOperation
A GeometryEditor.IGeometryEditorOperation which edits the CoordinateSequence of a Geometry.
Operates on Geometry subclasses which contains a single coordinate list.
GeometryEditor.NoOpGeometryOperation
A GeometryEditorOperation which does not modify the input geometry. This can be used for simple changes of GeometryFactory (including PrecisionModel and SRID).
GeometryExtracter
Extracts the components of a given type from a Geometry.
GeometryExtracter<T>
Extracts the components of type T
from a Geometry.
GeometryExtracterByTypeName
Extracts the components of type T
from a Geometry.
GeometryFixer
Fixes a geometry to be a valid geometry, while preserving as much as possible of the shape and location of the input. Validity is determined according to IsValid.
Input geometries are always processed, so even valid inputs may have some minor alterations.The output is always a new geometry object.
Semantic Rules
- Vertices with non-finite X or Y ordinates are removed (as per IsValid)
- Repeated points are reduced to a single point
- Empty atomic geometries are valid and are returned unchanged
- Empty elements are removed from collections
Point
: keep valid coordinate, or EMPTYLineString
: coordinates are fixedLinearRing
: coordinates are feixed, keep valid ring or else convert intoLineString
Polygon
: transform into a valid polygon, preserving as much of the extent and vertices as possible.- Rings are fixed to ensure they are valid
- Holes intersection the shell are subtracted from the shell
- Holes outside the shell are converted into polygons
MultiPolygon
: each polygon is fixed, then result made non - overlapping (via union)GeometryCollection
: each element is fixed- Collapsed lines and polygons are handled as follows,
depending on the
keepCollapsed
setting:false
: (default) collapses are converted to empty geometries (and removed if they are elements of collections)true
: collapses are converted to a valid geometry of lower dimension
GeometryMapper
Methods to map various collections of Geometrys via defined mapping functions.
GeometryMapper.MapOp
Standard implementation of a geometry mapping
GeometryTransformer
A framework for processes which transform an input Geometry
into
an output Geometry, possibly changing its structure and type(s).
LinearComponentExtracter
Extracts all the 1-dimensional (LineString) components from a Geometry. For polygonal geometries, this will extract all the component LinearRings. If desired, LinearRings can be forced to be returned as LineStrings.
LineStringExtracter
Extracts all the LineString elements from a Geometry.
Matrix
Implements some 2D matrix operations (in particular, solving systems of linear equations).
NoninvertibleTransformationException
Indicates that an AffineTransformation is non-invertible.
PointExtracter
Extracts all the 0-dimensional (Point
) components from a Geometry
.
PolygonExtracter
ShortCircuitedGeometryVisitor
A visitor to Geometry elements which components, which allows short-circuiting when a defined condition holds.
SineStarFactory
Creates geometries which are shaped like multi-armed stars with each arm shaped like a sine wave. These kinds of geometries are useful as a more complex geometry for testing algorithms.
Interfaces
GeometryEditor.IGeometryEditorOperation
A interface which specifies an edit operation for Geometries.
GeometryMapper.IMapOp
An interface for geometry functions used for mapping.