Class TopologyValidationError
- java.lang.Object
-
- org.meteoinfo.jts.operation.valid.TopologyValidationError
-
public class TopologyValidationError extends java.lang.ObjectContains information about the nature and location of aGeometryvalidation error
-
-
Field Summary
Fields Modifier and Type Field Description static intDISCONNECTED_INTERIORIndicates that the interior of a polygon is disjoint (often caused by set of contiguous holes splitting the polygon into two parts)static intDUPLICATE_RINGSIndicates that a polygonal geometry contains two rings which are identicalstatic java.lang.String[]errMsgMessages corresponding to error codesstatic intERRORDeprecated.static intHOLE_OUTSIDE_SHELLIndicates that a hole of a polygon lies partially or completely in the exterior of the shellstatic intINVALID_COORDINATEIndicates that theXorYordinate of a Coordinate is not a valid numeric value (e.g.static intNESTED_HOLESIndicates that a hole lies in the interior of another hole in the same polygonstatic intNESTED_SHELLSIndicates that a polygon component of a MultiPolygon lies inside another polygonal componentstatic intREPEATED_POINTDeprecated.static intRING_NOT_CLOSEDIndicates that a ring is not correctly closed (the first and the last coordinate are different)static intRING_SELF_INTERSECTIONIndicates that a ring self-intersectsstatic intSELF_INTERSECTIONIndicates that two rings of a polygonal geometry intersectstatic intTOO_FEW_POINTSIndicates that either a LineString contains a single point a LinearRing contains 2 or 3 points
-
Constructor Summary
Constructors Constructor Description TopologyValidationError(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinategetCoordinate()Returns the location of this error (on theGeometrycontaining the error).intgetErrorType()Gets the type of this error.java.lang.StringgetMessage()Gets an error message describing this error.java.lang.StringtoString()Gets a message describing the type and location of this error.
-
-
-
Field Detail
-
ERROR
public static final int ERROR
Deprecated.Not used- See Also:
- Constant Field Values
-
REPEATED_POINT
public static final int REPEATED_POINT
Deprecated.No longer used - repeated points are considered valid as per the SFS- See Also:
- Constant Field Values
-
HOLE_OUTSIDE_SHELL
public static final int HOLE_OUTSIDE_SHELL
Indicates that a hole of a polygon lies partially or completely in the exterior of the shell- See Also:
- Constant Field Values
-
NESTED_HOLES
public static final int NESTED_HOLES
Indicates that a hole lies in the interior of another hole in the same polygon- See Also:
- Constant Field Values
-
DISCONNECTED_INTERIOR
public static final int DISCONNECTED_INTERIOR
Indicates that the interior of a polygon is disjoint (often caused by set of contiguous holes splitting the polygon into two parts)- See Also:
- Constant Field Values
-
SELF_INTERSECTION
public static final int SELF_INTERSECTION
Indicates that two rings of a polygonal geometry intersect- See Also:
- Constant Field Values
-
RING_SELF_INTERSECTION
public static final int RING_SELF_INTERSECTION
Indicates that a ring self-intersects- See Also:
- Constant Field Values
-
NESTED_SHELLS
public static final int NESTED_SHELLS
Indicates that a polygon component of a MultiPolygon lies inside another polygonal component- See Also:
- Constant Field Values
-
DUPLICATE_RINGS
public static final int DUPLICATE_RINGS
Indicates that a polygonal geometry contains two rings which are identical- See Also:
- Constant Field Values
-
TOO_FEW_POINTS
public static final int TOO_FEW_POINTS
Indicates that either- a LineString contains a single point
- a LinearRing contains 2 or 3 points
- See Also:
- Constant Field Values
-
INVALID_COORDINATE
public static final int INVALID_COORDINATE
Indicates that theXorYordinate of a Coordinate is not a valid numeric value (e.g.Double.NaN)- See Also:
- Constant Field Values
-
RING_NOT_CLOSED
public static final int RING_NOT_CLOSED
Indicates that a ring is not correctly closed (the first and the last coordinate are different)- See Also:
- Constant Field Values
-
errMsg
public static final java.lang.String[] errMsg
Messages corresponding to error codes
-
-
Constructor Detail
-
TopologyValidationError
public TopologyValidationError(int errorType, Coordinate pt)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 Detail
-
getCoordinate
public Coordinate getCoordinate()
Returns the location of this error (on theGeometrycontaining the error).- Returns:
- a
Coordinateon the input geometry
-
getErrorType
public int getErrorType()
Gets the type of this error.- Returns:
- the error type
-
getMessage
public java.lang.String getMessage()
Gets an error message describing this error. The error message does not describe the location of the error.- Returns:
- the error message
-
toString
public java.lang.String toString()
Gets a message describing the type and location of this error.- Overrides:
toStringin classjava.lang.Object- Returns:
- the error message
-
-