public abstract class AbstractEarthModel extends Object implements EarthModel
Modifier and Type | Field and Description |
---|---|
(package private) double |
a
Model parameters: major and minor radius.
|
(package private) double |
b
Model parameters: major and minor radius.
|
(package private) double |
e
Derived model parameters: e and e squared.
|
(package private) double |
esq
Derived model parameters: e and e squared.
|
(package private) double |
f
Model parameters: flattening, inverse flattening.
|
(package private) double |
invf
Model parameters: flattening, inverse flattening.
|
private static int |
MAX_ITER
Maximum number of iterations.
|
private static double |
PRECISION
Maximum desired precision.
|
MODEL_ID
Constructor and Description |
---|
AbstractEarthModel(double a,
double b,
double f,
double invf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
distanceDeg(double lat1,
double lng1,
double lat2,
double lng2)
Compute the geodetic distance between two surface coordinates.
|
double |
distanceRad(double lat1,
double lng1,
double lat2,
double lng2)
Compute the geodetic distance between two surface coordinates.
|
double |
ecefToLatDeg(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude.
|
double[] |
ecefToLatLngDegHeight(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude, longitude and
height.
|
double[] |
ecefToLatLngRadHeight(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude, longitude and
height.
|
double |
ecefToLatRad(double x,
double y,
double z)
Convert a 3D coordinate pair to the corresponding latitude.
|
double |
ecefToLngDeg(double x,
double y)
Convert a 3D coordinate pair to the corresponding longitude.
|
double |
ecefToLngRad(double x,
double y)
Convert a 3D coordinate pair to the corresponding longitude.
|
double |
getEquatorialRadius()
Equatorial radius
|
double |
getPolarDistance()
Polar distance.
|
double[] |
latLngDegToECEF(double lat,
double lng)
Map a degree latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double[] |
latLngDegToECEF(double lat,
double lng,
double h)
Map a degree latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double[] |
latLngRadToECEF(double lat,
double lng)
Map a radians latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double[] |
latLngRadToECEF(double lat,
double lng,
double h)
Map a radians latitude, longitude pair to 3D X-Y-Z coordinates, using a
spherical earth model.
|
double |
minDistDeg(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Compute a lower bound for the geodetic distance point to rectangle.
|
double |
minDistRad(double plat,
double plng,
double rminlat,
double rminlng,
double rmaxlat,
double rmaxlng)
Compute a lower bound for the geodetic distance point to rectangle.
|
String |
toString() |
private static final int MAX_ITER
private static final double PRECISION
final double a
final double b
final double f
final double invf
final double e
final double esq
public AbstractEarthModel(double a, double b, double f, double invf)
a
- Major axis radiusb
- Minor axis radiusf
- Flatteninginvf
- Inverse flatteningpublic double getEquatorialRadius()
EarthModel
getEquatorialRadius
in interface EarthModel
public double getPolarDistance()
EarthModel
getPolarDistance
in interface EarthModel
public double[] latLngDegToECEF(double lat, double lng)
EarthModel
latLngDegToECEF
in interface EarthModel
lat
- Latitude in degreelng
- Longitude in degreepublic double[] latLngDegToECEF(double lat, double lng, double h)
EarthModel
latLngDegToECEF
in interface EarthModel
lat
- Latitude in degreelng
- Longitude in degreeh
- Heightpublic double[] latLngRadToECEF(double lat, double lng)
EarthModel
latLngRadToECEF
in interface EarthModel
lat
- Latitude in radianslng
- Longitude in radianspublic double[] latLngRadToECEF(double lat, double lng, double h)
EarthModel
latLngRadToECEF
in interface EarthModel
lat
- Latitude in radianslng
- Longitude in radiansh
- Heightpublic double ecefToLatDeg(double x, double y, double z)
EarthModel
ecefToLatDeg
in interface EarthModel
x
- X valuey
- Y valuez
- Z valuepublic double ecefToLatRad(double x, double y, double z)
EarthModel
ecefToLatRad
in interface EarthModel
x
- X valuey
- Y valuez
- Z valuepublic double ecefToLngDeg(double x, double y)
EarthModel
ecefToLngDeg
in interface EarthModel
x
- X valuey
- Y valuepublic double ecefToLngRad(double x, double y)
EarthModel
ecefToLngRad
in interface EarthModel
x
- X valuey
- Y valuepublic double[] ecefToLatLngDegHeight(double x, double y, double z)
EarthModel
EarthModel.ecefToLatDeg(double, double, double)
and EarthModel.ecefToLngDeg(double, double)
instead, which has a smaller memory footprint.ecefToLatLngDegHeight
in interface EarthModel
x
- X valuey
- Y valuez
- Z valuepublic double[] ecefToLatLngRadHeight(double x, double y, double z)
EarthModel
EarthModel.ecefToLatRad(double, double, double)
and EarthModel.ecefToLngRad(double, double)
instead, which has a smaller memory footprint.ecefToLatLngRadHeight
in interface EarthModel
x
- X valuey
- Y valuez
- Z valuepublic double distanceDeg(double lat1, double lng1, double lat2, double lng2)
EarthModel
distanceDeg
in interface EarthModel
lat1
- Latitude of first in degrees.lng1
- Longitude of first in degrees.lat2
- Latitude of second in degrees.lng2
- Longitude of second in degrees.public double distanceRad(double lat1, double lng1, double lat2, double lng2)
EarthModel
distanceRad
in interface EarthModel
lat1
- Latitude of first in radians.lng1
- Longitude of first in radians.lat2
- Latitude of second in radians.lng2
- Longitude of second in radians.public double minDistDeg(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)
EarthModel
minDistDeg
in interface EarthModel
plat
- Latitude of point in degrees.plng
- Longitude of point in degrees.rminlat
- Min latitude of rectangle in degrees.rminlng
- Min Longitude of rectangle in degrees.rmaxlat
- Max Latitude of rectangle in degrees.rmaxlng
- Max Longitude of rectangle in degrees.public double minDistRad(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)
EarthModel
minDistRad
in interface EarthModel
plat
- Latitude of point in radians.plng
- Longitude of point in radians.rminlat
- Min latitude of rectangle in radians.rminlng
- Min Longitude of rectangle in radians.rmaxlat
- Max Latitude of rectangle in radians.rmaxlng
- Max Longitude of rectangle in radians.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.