Interface EarthModel
-
- All Known Implementing Classes:
AbstractEarthModel,Clarke1858SpheroidEarthModel,Clarke1880SpheroidEarthModel,GRS67SpheroidEarthModel,GRS80SpheroidEarthModel,SphericalCosineEarthModel,SphericalHaversineEarthModel,SphericalVincentyEarthModel,WGS72SpheroidEarthModel,WGS84SpheroidEarthModel
public interface EarthModelAPI for handling different earth models.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doubledistanceDeg(double lat1, double lng1, double lat2, double lng2)Compute the geodetic distance between two surface coordinates.doubledistanceRad(double lat1, double lng1, double lat2, double lng2)Compute the geodetic distance between two surface coordinates.doubleecefToLatDeg(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.doubleecefToLatRad(double x, double y, double z)Convert a 3D coordinate pair to the corresponding latitude.doubleecefToLngDeg(double x, double y)Convert a 3D coordinate pair to the corresponding longitude.doubleecefToLngRad(double x, double y)Convert a 3D coordinate pair to the corresponding longitude.doublegetEquatorialRadius()Equatorial radiusdoublegetPolarDistance()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.doubleminDistDeg(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)Compute a lower bound for the geodetic distance point to rectangle.doubleminDistRad(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng)Compute a lower bound for the geodetic distance point to rectangle.
-
-
-
Field Detail
-
MODEL_ID
static final OptionID MODEL_ID
Parameter to choose the earth model to use.
-
-
Method Detail
-
latLngDegToECEF
double[] latLngDegToECEF(double lat, double lng)Map a degree latitude, longitude pair to 3D X-Y-Z coordinates, using a spherical earth model.The coordinate system is usually chosen such that the earth rotates around the Z axis and X points to the prime meridian and Equator.
- Parameters:
lat- Latitude in degreelng- Longitude in degree- Returns:
- Coordinate triple, in meters.
-
latLngRadToECEF
double[] latLngRadToECEF(double lat, double lng)Map a radians latitude, longitude pair to 3D X-Y-Z coordinates, using a spherical earth model.The coordinate system is usually chosen such that the earth rotates around the Z axis and X points to the prime meridian and Equator.
- Parameters:
lat- Latitude in radianslng- Longitude in radians- Returns:
- Coordinate triple, in meters.
-
latLngDegToECEF
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.The coordinate system is usually chosen such that the earth rotates around the Z axis and X points to the prime meridian and Equator.
- Parameters:
lat- Latitude in degreelng- Longitude in degreeh- Height- Returns:
- Coordinate triple, in meters.
-
latLngRadToECEF
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.The coordinate system is usually chosen such that the earth rotates around the Z axis and X points to the prime meridian and Equator.
- Parameters:
lat- Latitude in radianslng- Longitude in radiansh- Height- Returns:
- Coordinate triple, in meters.
-
ecefToLatDeg
double ecefToLatDeg(double x, double y, double z)Convert a 3D coordinate pair to the corresponding latitude.- Parameters:
x- X valuey- Y valuez- Z value- Returns:
- Latitude in degrees
-
ecefToLatRad
double ecefToLatRad(double x, double y, double z)Convert a 3D coordinate pair to the corresponding latitude.- Parameters:
x- X valuey- Y valuez- Z value- Returns:
- Latitude in radians
-
ecefToLngDeg
double ecefToLngDeg(double x, double y)Convert a 3D coordinate pair to the corresponding longitude.- Parameters:
x- X valuey- Y value- Returns:
- Longitude in degrees
-
ecefToLngRad
double ecefToLngRad(double x, double y)Convert a 3D coordinate pair to the corresponding longitude.- Parameters:
x- X valuey- Y value- Returns:
- Longitude in radians
-
ecefToLatLngDegHeight
double[] ecefToLatLngDegHeight(double x, double y, double z)Convert a 3D coordinate pair to the corresponding latitude, longitude and height.Note: if you are not interested in the height, use
ecefToLatDeg(double, double, double)andecefToLngDeg(double, double)instead, which has a smaller memory footprint.- Parameters:
x- X valuey- Y valuez- Z value- Returns:
- Array containing (latitude, longitude, height).
-
ecefToLatLngRadHeight
double[] ecefToLatLngRadHeight(double x, double y, double z)Convert a 3D coordinate pair to the corresponding latitude, longitude and height.Note: if you are not interested in the height, use
ecefToLatRad(double, double, double)andecefToLngRad(double, double)instead, which has a smaller memory footprint.- Parameters:
x- X valuey- Y valuez- Z value- Returns:
- Array containing (latitude, longitude, height).
-
distanceDeg
double distanceDeg(double lat1, double lng1, double lat2, double lng2)Compute the geodetic distance between two surface coordinates.- Parameters:
lat1- Latitude of first in degrees.lng1- Longitude of first in degrees.lat2- Latitude of second in degrees.lng2- Longitude of second in degrees.- Returns:
- Distance in meters.
-
distanceRad
double distanceRad(double lat1, double lng1, double lat2, double lng2)Compute the geodetic distance between two surface coordinates.- Parameters:
lat1- Latitude of first in radians.lng1- Longitude of first in radians.lat2- Latitude of second in radians.lng2- Longitude of second in radians.- Returns:
- Distance in meters.
-
minDistDeg
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.- Parameters:
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.- Returns:
- Distance in meters.
-
minDistRad
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.- Parameters:
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.- Returns:
- Distance in meters.
-
getEquatorialRadius
double getEquatorialRadius()
Equatorial radius- Returns:
- Radius
-
getPolarDistance
double getPolarDistance()
Polar distance.- Returns:
- Distance to poles (= minor radius)
-
-