java.lang.Object
org.elasticsearch.geometry.utils.GeographyValidator
- All Implemented Interfaces:
GeometryValidator
Validator that checks that lats are between -90 and +90 and lons are between -180 and +180 and altitude is present only if
ignoreZValue is set to true. It also validates a rectangle/envelope's y-ordinates (maxY cannot be less than minY),
but deliberately does not validate x-ordinate ordering: unlike
CartesianValidator, a geographic envelope may
legitimately have minX greater than maxX, to represent one that crosses the antimeridian.-
Field Summary
Fields inherited from interface org.elasticsearch.geometry.utils.GeometryValidator
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckAltitude(double zValue) protected voidcheckLatitude(double latitude) validates latitude value is within standard +/-90 coordinate boundsprotected voidcheckLongitude(double longitude) validates longitude value is within standard +/-180 coordinate boundsstatic GeometryValidatorinstance(boolean ignoreZValue) voidValidates the geometry and throws IllegalArgumentException if the geometry is not validMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.geometry.utils.GeometryValidator
validateBBox
-
Constructor Details
-
GeographyValidator
protected GeographyValidator(boolean ignoreZValue)
-
-
Method Details
-
instance
-
checkLatitude
protected void checkLatitude(double latitude) validates latitude value is within standard +/-90 coordinate bounds -
checkLongitude
protected void checkLongitude(double longitude) validates longitude value is within standard +/-180 coordinate bounds -
checkAltitude
protected void checkAltitude(double zValue) -
validate
Description copied from interface:GeometryValidatorValidates the geometry and throws IllegalArgumentException if the geometry is not valid- Specified by:
validatein interfaceGeometryValidator
-