Class IsValidOp
- Namespace
 - NetTopologySuite.Operation.Valid
 
- Assembly
 - NetTopologySuite.dll
 
Implements the algorithms required to compute the IsValid method for Geometrys. See the documentation for the various geometry types for a specification of validity.
public class IsValidOp
  - Inheritance
 - 
      
      IsValidOp
 
- Inherited Members
 
Constructors
IsValidOp(Geometry)
Creates a new validator for a geometry
public IsValidOp(Geometry inputGeometry)
  Parameters
inputGeometryGeometryThe geometry to validate
Properties
IsSelfTouchingRingFormingHoleValid
Gets/Sets whether polygons using Self-Touching Rings to form
holes are reported as valid.
If this flag is set, the following Self-Touching conditions
are treated as being valid:
- The shell ring self-touches to create a hole touching the shell.
- A hole ring self-touches to create two holes touching at a point.
The default (following the OGC SFS standard)
is that this condition is not valid (false).
This does not affect whether Self-Touching Rings disconnecting the polygon interior are considered valid (these are considered to be invalid under the SFS, and many other spatial models as well). This includes "bow-tie" shells, which self-touch at a single point causing the interior to be disconnected, and "C-shaped" holes which self-touch at a single point causing an island to be formed.
[Obsolete("Use SelfTouchingRingFormingHoleValid")]
public bool IsSelfTouchingRingFormingHoleValid { get; set; }
  Property Value
- bool
 States whether geometry with this condition is valid.
IsValid
Tests the validity of the input geometry.
public bool IsValid { get; }
  Property Value
- bool
 trueif the geometry is valid.
SelfTouchingRingFormingHoleValid
Gets or sets a value indicating whether polygons using Self-Touching Rings to form holes are reported as valid. If this flag is set, the following Self-Touching conditions are treated as being valid:
- the shell ring self-touches to create a hole touching the shell
 - a hole ring self-touches to create two holes touching at a point
 
false).
Self-Touching Rings which disconnect the
the polygon interior are still considered to be invalid
(these are invalid under the SFS, and many other
spatial models as well).
This includes:
- exverted ("bow-tie") shells which self-touch at a single point
 - inverted shells with the inversion touching the shell at another point
 - exverted holes with exversion touching the hole at another point
 - inverted ("C-shaped") holes which self-touch at a single point causing an island to be formed
 - inverted shells or exverted holes which form part of a chain of touching rings (which disconnect the interior)
 
public bool SelfTouchingRingFormingHoleValid { get; set; }
  Property Value
ValidationError
Gets a value indicating the validity of the geometry
If not valid, returns the validation error for the geometry,
or null if the geometry is valid.
public TopologyValidationError ValidationError { get; }
  Property Value
- TopologyValidationError
 The validation error, if the geometry is invalid or null if the geometry is valid
Methods
CheckValid(Geometry)
Tests whether a Geometry is valid.
public static bool CheckValid(Geometry geom)
  Parameters
geomGeometryThe geometry to test
Returns
- bool
 trueif the geometry is valid
Remarks
In JTS this function is called IsValid
FindPointNotNode(Coordinate[], LinearRing, GeometryGraph)
Find a point from the list of testCoords that is NOT a node in the edge for the list of searchCoords.
[Obsolete]
public static Coordinate FindPointNotNode(Coordinate[] testCoords, LinearRing searchRing, GeometryGraph graph)
  Parameters
testCoordsCoordinate[]searchRingLinearRinggraphGeometryGraph
Returns
- Coordinate
 The point found, or
nullif none found.
IsValidCoordinate(Coordinate)
Checks whether a coordinate is valid for processing. Coordinates are valid if their x and y ordinates are in the range of the floating point representation.
[Obsolete("Use Coordinate.IsValid")]
public static bool IsValidCoordinate(Coordinate coord)
  Parameters
coordCoordinateThe coordinate to validate
Returns
- bool
 trueif the coordinate is valid