@PSOperatorWrapper public class GeolocationOperators extends java.lang.Object
Constructor and Description |
---|
GeolocationOperators() |
Modifier and Type | Method and Description |
---|---|
static Function<Item,java.lang.Double> |
distanceBetween(java.lang.String latLonField1,
java.lang.String latLonField2)
Get the distance between two locations (in meters).
|
static Function<Item,LatLon> |
distort(java.lang.String latLonField,
double radius)
Distort the coordinates value of a field and return the distorted coordinates.
|
static Function<Item,java.lang.Boolean> |
inCircle(java.lang.String latLonField,
double centerLat,
double centerLng,
double radius)
Check if the coordinates specified by a LatLon field is a location in an given circular region.
|
static Function<Item,java.lang.Boolean> |
inSquare(java.lang.String latLonField,
double minLat,
double minLng,
double maxLat,
double maxLng)
Check if the coordinates specified by a LatLon field is a location in an given square region.
|
public static Function<Item,java.lang.Boolean> inCircle(java.lang.String latLonField, double centerLat, double centerLng, double radius)
latLonField
- the LatLon field to checkcenterLat
- latitude of the center of the areacenterLng
- longitude of the center of the arearadius
- radius of the region, in meterspublic static Function<Item,java.lang.Boolean> inSquare(java.lang.String latLonField, double minLat, double minLng, double maxLat, double maxLng)
latLonField
- the LatLon field to checkminLat
- the minimum latitude of the regionminLng
- the minimum longitude of the regionmaxLat
- the maximum latitude of the regionmaxLng
- the maximum longitude of the regionpublic static Function<Item,LatLon> distort(java.lang.String latLonField, double radius)
latLonField
- the coordinates field to distortradius
- the distance to distort, in meters