Namespace NetTopologySuite.Operation.Valid
Classes
- ConnectedInteriorTester
This class tests that the interior of an area Geometry (Polygon or MultiPolygon) is connected. An area Geometry is invalid if the interior is disconnected. This can happen if:
- a shell self-intersects,
- one or more holes form a connected chain touching a shell at two different points,
- one or more holes form a ring around a subset of the interior. If a disconnected situation is found the location of the problem is recorded.
- ConsistentAreaTester
Checks that a GeometryGraph representing an area (a
Polygon
orMultiPolygon
) is consistent with the SFS semantics for area geometries. Checks include: Testing for rings which self-intersect (both properly and at nodes). Testing for duplicate rings. If an inconsistency if found the location of the problem is recorded.
- IndexedNestedRingTester
Tests whether any of a set of LinearRings are nested inside another ring in the set, using a spatial index to speed up the comparisons.
- IsSimpleOp
Tests whether a
Simplicity is defined for each Geometry type as follows:Geometry
is simple as defined by the OGC SFS specification.- Pointgeometries are simple.
- MultiPointgeometries are simple if every point is unique
- LineStringgeometries are simple if they do not self-intersect at interior points (i.e.points other than the endpoints). Closed linestrings which intersect only at their endpoints are simple (i.e. valid LinearRingss.
- MultiLineStringgeometries are simple if their elements are simple and they intersect only at points which are boundary points of both elements. (The notion of boundary points can be user-specified - see below).
- Polygonalgeometries have no definition of simplicity.
The
IsSimple
code checks if all polygon rings are simple. (Note: this means thatIsSimple cannot be used to test for all self-intersections in Polygon s. In order to check if a IPolygonal geometry has self-intersections, use IsValid. - GeometryCollectiongeometries are simple if all their elements are simple.
- Empty geometries are simple
LineString
s touch only at their endpoints, use EndpointBoundaryRule. For example, this can be used to validate that a collection of lines form a topologically valid linear network. By default this class finds a single non-simple location. To find all non-simple locations, set FindAllLocations before calling IsSimple(), and retrieve the locations via NonSimpleLocations. This can be used to find all intersection points in a linear network.
- IsValidOp
Implements the algorithms required to compute the IsValid method for Geometrys. See the documentation for the various geometry types for a specification of validity.
- RepeatedPointTester
Implements the appropriate checks for repeated points (consecutive identical coordinates) as defined in the NTS spec.
- TopologyValidationError
Contains information about the nature and location of a
Geometry
validation error.
Enums
- TopologyValidationErrors
Contains information about the nature and location of a Geometry validation error.