public abstract class GeodesicSphereDistCalc extends AbstractDistanceCalculator
Modifier and Type | Class and Description |
---|---|
static class |
GeodesicSphereDistCalc.Haversine |
static class |
GeodesicSphereDistCalc.LawOfCosines |
static class |
GeodesicSphereDistCalc.Vincenty |
Constructor and Description |
---|
GeodesicSphereDistCalc() |
Modifier and Type | Method and Description |
---|---|
double |
area(Circle circle) |
double |
area(Rectangle rect) |
double |
calcBoxByDistFromPt_yHorizAxisDEG(Point from,
double distDEG,
SpatialContext ctx)
The
Y coordinate of the horizontal axis of a circle that has maximum width. |
Rectangle |
calcBoxByDistFromPt(Point from,
double distDEG,
SpatialContext ctx,
Rectangle reuse)
Calculates the bounding box of a circle, as specified by its center point
and distance.
|
double |
distance(Point from,
double toX,
double toY)
The distance between
from and Point(toX,toY) . |
protected abstract double |
distanceLatLonRAD(double lat1,
double lon1,
double lat2,
double lon2) |
boolean |
equals(Object obj) |
int |
hashCode() |
Point |
pointOnBearing(Point from,
double distDEG,
double bearingDEG,
SpatialContext ctx,
Point reuse)
Calculates where a destination point is given an origin (
from )
distance, and bearing (given in degrees -- 0-360). |
distance, toString, within
public Point pointOnBearing(Point from, double distDEG, double bearingDEG, SpatialContext ctx, Point reuse)
DistanceCalculator
from
)
distance, and bearing (given in degrees -- 0-360). If reuse is given, then
this method may reset() it and return it.public Rectangle calcBoxByDistFromPt(Point from, double distDEG, SpatialContext ctx, Rectangle reuse)
DistanceCalculator
public double calcBoxByDistFromPt_yHorizAxisDEG(Point from, double distDEG, SpatialContext ctx)
DistanceCalculator
Y
coordinate of the horizontal axis of a circle that has maximum width. On a
2D plane, this result is always from.getY()
but, perhaps surprisingly, on a sphere
it is going to be slightly different.public double area(Rectangle rect)
public double area(Circle circle)
public final double distance(Point from, double toX, double toY)
DistanceCalculator
from
and Point(toX,toY)
.protected abstract double distanceLatLonRAD(double lat1, double lon1, double lat2, double lon2)
Copyright © 2020 LocationTech. All rights reserved.