Package org.elasticsearch.geometry.utils
Class GeographyValidator
java.lang.Object
org.elasticsearch.geometry.utils.GeographyValidator
- All Implemented Interfaces:
GeometryValidator
public class GeographyValidator extends java.lang.Object implements 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
-
Constructor Summary
Constructors Constructor Description GeographyValidator(boolean ignoreZValue)
-
Method Summary
Modifier and Type Method Description protected void
checkAltitude(double zValue)
protected void
checkLatitude(double latitude)
validates latitude value is within standard +/-90 coordinate boundsprotected void
checkLongitude(double longitude)
validates longitude value is within standard +/-180 coordinate boundsvoid
validate(Geometry geometry)
Validates 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, wait
-
Constructor Details
-
GeographyValidator
public GeographyValidator(boolean ignoreZValue)
-
-
Method Details
-
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:GeometryValidator
Validates the geometry and throws IllegalArgumentException if the geometry is not valid- Specified by:
validate
in interfaceGeometryValidator
-