public enum GeoDistance extends Enum<GeoDistance>
Modifier and Type | Class and Description |
---|---|
static class |
GeoDistance.ArcFixedSourceDistance |
static interface |
GeoDistance.DistanceBoundingCheck |
static class |
GeoDistance.FactorFixedSourceDistance |
static interface |
GeoDistance.FixedSourceDistance |
static class |
GeoDistance.FixedSourceDistanceBase
Basic implementation of
GeoDistance.FixedSourceDistance . |
static class |
GeoDistance.Meridian180DistanceBoundingCheck |
static class |
GeoDistance.PlaneFixedSourceDistance |
static class |
GeoDistance.SimpleDistanceBoundingCheck |
static class |
GeoDistance.SloppyArcFixedSourceDistance |
Enum Constant and Description |
---|
ARC
Calculates distance as points on a globe.
|
FACTOR
Calculates distance factor.
|
PLANE
Calculates distance as points on a plane.
|
SLOPPY_ARC
Calculates distance as points on a globe in a sloppy way.
|
Modifier and Type | Field and Description |
---|---|
static org.elasticsearch.common.geo.GeoDistance.AlwaysDistanceBoundingCheck |
ALWAYS_INSTANCE |
static GeoDistance |
DEFAULT
Default
GeoDistance function. |
Modifier and Type | Method and Description |
---|---|
abstract double |
calculate(double sourceLatitude,
double sourceLongitude,
double targetLatitude,
double targetLongitude,
DistanceUnit unit) |
static GeoDistance.DistanceBoundingCheck |
distanceBoundingCheck(double sourceLatitude,
double sourceLongitude,
double distance,
DistanceUnit unit) |
static SortedNumericDoubleValues |
distanceValues(MultiGeoPointValues geoPointValues,
GeoDistance.FixedSourceDistance... distances)
Return a
SortedNumericDoubleValues instance that returns the distances to a list of geo-points for each document. |
abstract GeoDistance.FixedSourceDistance |
fixedSourceDistance(double sourceLatitude,
double sourceLongitude,
DistanceUnit unit) |
static GeoDistance |
fromString(String name)
Get a
GeoDistance according to a given name. |
abstract double |
normalize(double distance,
DistanceUnit unit) |
static GeoDistance |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GeoDistance[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GeoDistance PLANE
ARC
.public static final GeoDistance FACTOR
public static final GeoDistance ARC
public static final GeoDistance SLOPPY_ARC
public static final GeoDistance DEFAULT
GeoDistance
function. This method should be used, If no specific function has been selected.
This is an alias for SLOPPY_ARC
public static final org.elasticsearch.common.geo.GeoDistance.AlwaysDistanceBoundingCheck ALWAYS_INSTANCE
public static GeoDistance[] values()
for (GeoDistance c : GeoDistance.values()) System.out.println(c);
public static GeoDistance valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract double normalize(double distance, DistanceUnit unit)
public abstract double calculate(double sourceLatitude, double sourceLongitude, double targetLatitude, double targetLongitude, DistanceUnit unit)
public abstract GeoDistance.FixedSourceDistance fixedSourceDistance(double sourceLatitude, double sourceLongitude, DistanceUnit unit)
public static GeoDistance.DistanceBoundingCheck distanceBoundingCheck(double sourceLatitude, double sourceLongitude, double distance, DistanceUnit unit)
public static GeoDistance fromString(String name)
GeoDistance
according to a given name. Valid values are
GeoDistance.PLANE
GeoDistance.SLOPPY_ARC
GeoDistance.FACTOR
GeoDistance.ARC
name
- name of the GeoDistance
GeoDistance
public static SortedNumericDoubleValues distanceValues(MultiGeoPointValues geoPointValues, GeoDistance.FixedSourceDistance... distances)
SortedNumericDoubleValues
instance that returns the distances to a list of geo-points for each document.Copyright © 2009–2016. All rights reserved.