Class TopologyValidationError
java.lang.Object
org.locationtech.jts.operation.valid.TopologyValidationError
Contains information about the nature and location of a
Geometry
validation error- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates that the interior of a polygon is disjoint (often caused by set of contiguous holes splitting the polygon into two parts)static final int
Indicates that a polygonal geometry contains two rings which are identicalstatic final String[]
Messages corresponding to error codesstatic final int
Deprecated.static final int
Indicates that a hole of a polygon lies partially or completely in the exterior of the shellstatic final int
Indicates that theX
orY
ordinate of a Coordinate is not a valid numeric value (e.g.static final int
Indicates that a hole lies in the interior of another hole in the same polygonstatic final int
Indicates that a polygon component of a MultiPolygon lies inside another polygonal componentstatic final int
Deprecated.static final int
Indicates that a ring is not correctly closed (the first and the last coordinate are different)static final int
Indicates that a ring self-intersectsstatic final int
Indicates that two rings of a polygonal geometry intersectstatic final int
Indicates that either a LineString contains a single point a LinearRing contains 2 or 3 points -
Constructor Summary
ConstructorsConstructorDescriptionTopologyValidationError
(int errorType) Creates a validation error of the given type with a null locationTopologyValidationError
(int errorType, Coordinate pt) Creates a validation error with the given type and location -
Method Summary
-
Field Details
-
ERROR
public static final int ERRORDeprecated.Not used- See Also:
-
REPEATED_POINT
public static final int REPEATED_POINTDeprecated.No longer used - repeated points are considered valid as per the SFS- See Also:
-
HOLE_OUTSIDE_SHELL
public static final int HOLE_OUTSIDE_SHELLIndicates that a hole of a polygon lies partially or completely in the exterior of the shell- See Also:
-
NESTED_HOLES
public static final int NESTED_HOLESIndicates that a hole lies in the interior of another hole in the same polygon- See Also:
-
DISCONNECTED_INTERIOR
public static final int DISCONNECTED_INTERIORIndicates that the interior of a polygon is disjoint (often caused by set of contiguous holes splitting the polygon into two parts)- See Also:
-
SELF_INTERSECTION
public static final int SELF_INTERSECTIONIndicates that two rings of a polygonal geometry intersect- See Also:
-
RING_SELF_INTERSECTION
public static final int RING_SELF_INTERSECTIONIndicates that a ring self-intersects- See Also:
-
NESTED_SHELLS
public static final int NESTED_SHELLSIndicates that a polygon component of a MultiPolygon lies inside another polygonal component- See Also:
-
DUPLICATE_RINGS
public static final int DUPLICATE_RINGSIndicates that a polygonal geometry contains two rings which are identical- See Also:
-
TOO_FEW_POINTS
public static final int TOO_FEW_POINTSIndicates that either- a LineString contains a single point
- a LinearRing contains 2 or 3 points
- See Also:
-
INVALID_COORDINATE
public static final int INVALID_COORDINATE- See Also:
-
RING_NOT_CLOSED
public static final int RING_NOT_CLOSEDIndicates that a ring is not correctly closed (the first and the last coordinate are different)- See Also:
-
errMsg
Messages corresponding to error codes
-
-
Constructor Details
-
TopologyValidationError
Creates a validation error with the given type and location- Parameters:
errorType
- the type of the errorpt
- the location of the error
-
TopologyValidationError
public TopologyValidationError(int errorType) Creates a validation error of the given type with a null location- Parameters:
errorType
- the type of the error
-
-
Method Details
-
getCoordinate
Returns the location of this error (on theGeometry
containing the error).- Returns:
- a
Coordinate
on the input geometry
-
getErrorType
public int getErrorType()Gets the type of this error.- Returns:
- the error type
-
getMessage
Gets an error message describing this error. The error message does not describe the location of the error.- Returns:
- the error message
-
toString
Gets a message describing the type and location of this error.
-