public abstract class SphericalDistanceLibrary extends Object
Modifier and Type | Field and Description |
---|---|
static double |
MAX_ERR_INV |
static double |
MAX_LAT_DELTA_DEG |
static double |
MAX_LON_DELTA_DEG |
static double |
RADIUS_OF_EARTH_IN_KM |
static double |
RADIUS_OF_EARTH_IN_M |
Constructor and Description |
---|
SphericalDistanceLibrary() |
Modifier and Type | Method and Description |
---|---|
static com.vividsolutions.jts.geom.Envelope |
bounds(double lat,
double lon,
double latDistance,
double lonDistance) |
static double |
degreesLatitudeToMeters(double degreesLatitude) |
static double |
distance(com.vividsolutions.jts.geom.Coordinate from,
com.vividsolutions.jts.geom.Coordinate to) |
static double |
distance(double lat1,
double lon1,
double lat2,
double lon2) |
static double |
distance(double lat1,
double lon1,
double lat2,
double lon2,
double radius) |
static double |
fastDistance(com.vividsolutions.jts.geom.Coordinate from,
com.vividsolutions.jts.geom.Coordinate to) |
static double |
fastDistance(com.vividsolutions.jts.geom.Coordinate from,
com.vividsolutions.jts.geom.Coordinate to,
double cosLat) |
static double |
fastDistance(com.vividsolutions.jts.geom.Coordinate point,
com.vividsolutions.jts.geom.LineString lineString)
Compute an (approximated) distance between a point and a linestring expressed in standard geographical
coordinates (lon, lat in degrees).
|
static double |
fastDistance(double lat1,
double lon1,
double lat2,
double lon2)
Compute an (approximated) distance between two points, with a known cos(lat).
|
static double |
fastDistance(double lat1,
double lon1,
double lat2,
double lon2,
double radius)
Approximated, fast and under-estimated equirectangular distance between two points.
|
static double |
fastLength(com.vividsolutions.jts.geom.LineString lineString)
Compute the (approximated) length of a polyline
|
static double |
fastLength(com.vividsolutions.jts.geom.LineString lineString,
double cosLat)
Compute the (approximated) length of a polyline, with known cos(lat).
|
static double |
metersToDegrees(double distanceMeters) |
static double |
metersToLonDegrees(double distanceMeters,
double latDeg) |
public static final double RADIUS_OF_EARTH_IN_KM
public static final double RADIUS_OF_EARTH_IN_M
public static final double MAX_LAT_DELTA_DEG
public static final double MAX_LON_DELTA_DEG
public static final double MAX_ERR_INV
public static final double distance(com.vividsolutions.jts.geom.Coordinate from, com.vividsolutions.jts.geom.Coordinate to)
public static final double fastDistance(com.vividsolutions.jts.geom.Coordinate from, com.vividsolutions.jts.geom.Coordinate to)
public static final double fastDistance(com.vividsolutions.jts.geom.Coordinate from, com.vividsolutions.jts.geom.Coordinate to, double cosLat)
public static final double fastDistance(com.vividsolutions.jts.geom.Coordinate point, com.vividsolutions.jts.geom.LineString lineString)
point
- The coordinates of the point (longitude, latitude degrees).lineString
- The set of points representing the polyline, in the same coordinate system.public static final double fastLength(com.vividsolutions.jts.geom.LineString lineString)
lineString
- The polyline in (longitude, latitude degrees).public static final double fastLength(com.vividsolutions.jts.geom.LineString lineString, double cosLat)
lineString
- The polyline in (longitude, latitude degrees).public static final double distance(double lat1, double lon1, double lat2, double lon2)
public static final double fastDistance(double lat1, double lon1, double lat2, double lon2)
public static final double distance(double lat1, double lon1, double lat2, double lon2, double radius)
public static final double fastDistance(double lat1, double lon1, double lat2, double lon2, double radius)
public static double metersToDegrees(double distanceMeters)
distanceMeters
- Distance in meters.public static double degreesLatitudeToMeters(double degreesLatitude)
public static double metersToLonDegrees(double distanceMeters, double latDeg)
distanceMeters
- Distance in meters.latDeg
- Latitude of center point, in degree.public static final com.vividsolutions.jts.geom.Envelope bounds(double lat, double lon, double latDistance, double lonDistance)
Copyright © 2018. All rights reserved.