public class GeoDistanceUtils extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DISTANCE_PCT_ERR
error threshold for point-distance queries (in percent) NOTE: Guideline from USGS is 0.005
|
Modifier and Type | Method and Description |
---|---|
static void |
closestPointOnBBox(double rMinY,
double rMaxY,
double rMinX,
double rMaxX,
double lat,
double lon,
double[] closestPt)
Finds the closest point within a rectangle (defined by rMinX, rMinY, rMaxX, rMaxY) to the given (lon, lat) point
the result is provided in closestPt (lat, lon).
|
static double |
distanceToDegreesLon(double lat,
double distance)
Compute the inverse haversine to determine distance in degrees longitude for provided distance in meters
|
static double |
linearDistance(double[] pt1,
double[] pt2)
Computes distance between two points in a cartesian (x, y, {z - optional}) coordinate system
|
static double |
maxRadialDistanceMeters(double centerLat,
double centerLon)
Returns the maximum distance/radius (in meters) from the point 'center' before overlapping
|
public static final double DISTANCE_PCT_ERR
public static double linearDistance(double[] pt1, double[] pt2)
public static double distanceToDegreesLon(double lat, double distance)
lat
- latitude to compute delta degrees londistance
- distance in meters to convert to degrees lonpublic static void closestPointOnBBox(double rMinY, double rMaxY, double rMinX, double rMaxX, double lat, double lon, double[] closestPt)
public static double maxRadialDistanceMeters(double centerLat, double centerLon)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.