public class LinearSquaredDistance extends Object implements DistanceStyle
| Modifier and Type | Field and Description |
|---|---|
static LinearSquaredDistance |
INSTANCE
A convenient instance
|
ARC, LINEAR, LINEAR_SQUARED, NORMAL, NORMAL_SQUARED| Constructor and Description |
|---|
LinearSquaredDistance()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
computeDistance(GeoPoint point1,
double x2,
double y2,
double z2)
Compute the distance from a point to another point.
|
double |
computeDistance(GeoPoint point1,
GeoPoint point2)
Compute the distance from a point to another point.
|
double |
computeDistance(PlanetModel planetModel,
Plane plane,
double x,
double y,
double z,
Membership... bounds)
Compute the distance from a plane to a point.
|
double |
computeDistance(PlanetModel planetModel,
Plane plane,
GeoPoint point,
Membership... bounds)
Compute the distance from a plane to a point.
|
GeoPoint[] |
findDistancePoints(PlanetModel planetModel,
double distanceValue,
GeoPoint startPoint,
Plane plane,
Membership... bounds)
Find a GeoPoint, at a specified distance from a starting point, within the
specified bounds.
|
double |
findMaximumArcDistance(PlanetModel planetModel,
double distanceValue)
Given a distance metric, find the maximum arc distance represented by the distance metric.
|
double |
findMinimumArcDistance(PlanetModel planetModel,
double distanceValue)
Given a distance metric, find the minimum arc distance represented by that distance metric.
|
double |
fromAggregationForm(double aggregateDistance)
Convert an aggregation form distance value back to an actual distance.
|
double |
toAggregationForm(double distance)
Convert a distance to a form meant for aggregation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaggregateDistancespublic static final LinearSquaredDistance INSTANCE
public double computeDistance(GeoPoint point1, GeoPoint point2)
DistanceStylecomputeDistance in interface DistanceStylepoint1 - Starting pointpoint2 - Final pointpublic double computeDistance(GeoPoint point1, double x2, double y2, double z2)
DistanceStylecomputeDistance in interface DistanceStylepoint1 - Starting pointx2 - Final point xy2 - Final point yz2 - Final point zpublic double computeDistance(PlanetModel planetModel, Plane plane, GeoPoint point, Membership... bounds)
DistanceStylecomputeDistance in interface DistanceStyleplanetModel - The planet modelplane - The planepoint - The pointbounds - are the plane boundspublic double computeDistance(PlanetModel planetModel, Plane plane, double x, double y, double z, Membership... bounds)
DistanceStylecomputeDistance in interface DistanceStyleplanetModel - The planet modelplane - The planex - The point xy - The point yz - The point zbounds - are the plane boundspublic double toAggregationForm(double distance)
DistanceStyletoAggregationForm in interface DistanceStyledistance - is an output of computeDistance().public double fromAggregationForm(double aggregateDistance)
DistanceStylefromAggregationForm in interface DistanceStyleaggregateDistance - is the aggregate form of the distance.public GeoPoint[] findDistancePoints(PlanetModel planetModel, double distanceValue, GeoPoint startPoint, Plane plane, Membership... bounds)
DistanceStylefindDistancePoints in interface DistanceStyleplanetModel - is the planet model.distanceValue - is the distance to set the new point at, measured from point1 and on the way to point2.startPoint - is the starting point.plane - is the plane that the point must be in.bounds - are the constraints on where the point can be found.public double findMinimumArcDistance(PlanetModel planetModel, double distanceValue)
DistanceStylefindMinimumArcDistance in interface DistanceStyleplanetModel - is the planet model.distanceValue - is the distance metric.public double findMaximumArcDistance(PlanetModel planetModel, double distanceValue)
DistanceStylefindMaximumArcDistance in interface DistanceStyleplanetModel - is the planet model.distanceValue - is the distance metric.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.