IsValidOp class

Implements the algorithms required to compute the isValid() method for {@link Geometry}s. See the documentation for the various geometry types for a specification of validity.

@version 1.7

Constructors

IsValidOp(Geometry parentGeometry)

Properties

hashCode int
The hash code for this object.
no setterinherited
isSelfTouchingRingFormingHoleValid bool
If the following condition is TRUE JTS will validate inverted shells and exverted holes (the ESRI SDE model)
getter/setter pair
parentGeometry Geometry
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validErr TopologyValidationError?
getter/setter pair

Methods

checkClosedRing(LinearRing ring) → void
checkClosedRings(Polygon poly) → void
checkConnectedInteriors(GeometryGraph graph) → void
checkConsistentArea(GeometryGraph graph) → void
Checks that the arrangement of edges in a polygonal geometry graph forms a consistent area.
checkHolesInShell(Polygon p, GeometryGraph graph) → void
Tests that each hole is inside the polygon shell. This routine assumes that the holes have previously been tested to ensure that all vertices lie on the shell or on the same side of it (i.e. that the hole rings do not cross the shell ring). In other words, this test is only correct if the ConsistentArea test is passed first. Given this, a simple point-in-polygon test of a single point in the hole can be used, provided the point is chosen such that it does not lie on the shell.
checkHolesNotNested(Polygon p, GeometryGraph graph) → void
Tests that no hole is nested inside another hole. This routine assumes that the holes are disjoint. To ensure this, holes have previously been tested to ensure that:
checkInvalidCoordinates(Polygon poly) → void
checkInvalidCoordinatesList(List<Coordinate> coords) → void
checkNoSelfIntersectingRing(EdgeIntersectionList eiList) → void
Check that a ring does not self-intersect, except at its endpoints. Algorithm is to count the number of times each node along edge occurs. If any occur more than once, that must be a self-intersection.
checkNoSelfIntersectingRings(GeometryGraph graph) → void
Check that there is no ring which self-intersects (except of course at its endpoints). This is required by OGC topology rules (but not by other models such as ESRI SDE, which allow inverted shells and exverted holes).
checkShellInsideHole(LinearRing shell, LinearRing hole, GeometryGraph graph) Coordinate?
This routine checks to see if a shell is properly contained in a hole. It assumes that the edges of the shell and hole do not properly intersect.
checkShellNotNested(LinearRing shell, Polygon p, GeometryGraph graph) → void
Check if a shell is incorrectly nested within a polygon. This is the case if the shell is inside the polygon shell, but not inside a polygon hole. (If the shell is inside a polygon hole, the nesting is valid.)
checkShellsNotNested(MultiPolygon mp, GeometryGraph graph) → void
Tests that no element polygon is wholly in the interior of another element polygon.
checkTooFewPoints(GeometryGraph graph) → void
checkValid(Geometry g) → void
checkValidGC(GeometryCollection gc) → void
checkValidL(LineString g) → void
Checks validity of a LineString. Almost anything goes for linestrings!
checkValidLR(LinearRing g) → void
Checks validity of a LinearRing.
checkValidMP(MultiPoint g) → void
Checks validity of a MultiPoint.
checkValidMPol(MultiPolygon g) → void
checkValidP(Point g) → void
Checks validity of a Point.
checkValidPol(Polygon g) → void
Checks the validity of a polygon. Sets the validErr flag.
getValidationError() TopologyValidationError?
Computes the validity of the geometry, and if not valid returns the validation error for the geometry, or null if the geometry is valid.
isValid() bool
Computes the validity of the geometry, and returns true if it is valid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setSelfTouchingRingFormingHoleValid(bool isValid) → void
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:
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

findPtNotNode(List<Coordinate> testCoords, LinearRing searchRing, GeometryGraph graph) Coordinate?
Find a point from the list of testCoords that is NOT a node in the edge for the list of searchCoords
isValidStatic(Geometry geom) bool
Tests whether a {@link Geometry} is valid. @param geom the Geometry to test @return true if the geometry is valid
isValidStaticCoord(Coordinate coord) bool
Checks whether a coordinate is valid for processing. Coordinates are valid iff their x and y ordinates are in the range of the floating point representation.