- All Known Implementing Classes:
CartesianValidator,GeographyValidator,StandardValidator
public interface GeometryValidator
Generic geometry validator that can be used by the parser to verify the validity of the parsed geometry
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidValidates the geometry and throws IllegalArgumentException if the geometry is not validdefault voidvalidateBBox(double minX, double maxX, double maxY, double minY) Validates the ordinate ordering of a rectangle/envelope, throwing IllegalArgumentException if the envelope is invalid.default voidvalidateCoordinate(double x, double y, double z) Validates a single coordinate and throws IllegalArgumentException if it is not valid.
-
Field Details
-
NOOP
-
-
Method Details
-
validate
Validates the geometry and throws IllegalArgumentException if the geometry is not valid -
validateCoordinate
default void validateCoordinate(double x, double y, double z) Validates a single coordinate and throws IllegalArgumentException if it is not valid. Default implementation is a no-op. -
validateBBox
default void validateBBox(double minX, double maxX, double maxY, double minY) Validates the ordinate ordering of a rectangle/envelope, throwing IllegalArgumentException if the envelope is invalid. The default implementation only checks that maxY is not less than minY, since that is always invalid, regardless of CRS. It deliberately does not check x-ordinate ordering: geographic coordinates allow minX to legitimately exceed maxX, to represent an envelope that crosses the antimeridian, so only implementations for CRSes without that concept (e.g.CartesianValidator) need to additionally check that maxX is not less than minX.
-