Package llnl.gnem.core.util.Geometry
Class CoordinateTransform
java.lang.Object
llnl.gnem.core.util.Geometry.CoordinateTransform
User: Eric Matzel Date: Mar 23, 2010
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DCartesianToPolar(double x, double y) Cartesian coordinates x,y to Polar coordinates theta, phi, z = 0static org.apache.commons.math3.geometry.euclidean.threed.Vector3DCartesianToPolar(double x, double y, double z) Cartesian coordinates x,y,z to Polar coordinates theta, rho, zstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DCartesianToPolar(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Cartesian coordinates x,y,z to Polar coordinates theta, rho, zstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DCartesianToSpherical(double x, double y, double z) Cartesian coordinates x,y,z to Spherical coordinates theta, phi, rstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DCartesianToSpherical(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Cartesian coordinates x,y,z to Spherical coordinates theta, phi, rstatic doubleGeocentricToGeodeticLatitude(double geocentriclatitude) static doubleGeodeticToGeocentricLatitude(double geodeticlatitude) static org.apache.commons.math3.geometry.euclidean.threed.Vector3DLonLatRadiusToXYZ(double longitude, double latitude, double radius) A convenience method to allow SphericalToCartesian conversion from longitude, latitude (DEGREES) instead of theta,phi (RADIANS)static org.apache.commons.math3.geometry.euclidean.threed.Vector3DLonLatRadiusToXYZ(org.apache.commons.math3.geometry.euclidean.threed.Vector3D lonlatradpoint) A convenience method to allow SphericalToCartesian conversion from longitude, latitude (DEGREES) instead of theta,phi (RADIANS) NOTE: units of radius (e.g.static org.apache.commons.math3.geometry.euclidean.threed.Vector3DPolarToCartesian(double theta, double rho) Polar coordinates theta, rho, (z = 0) to Cartesian coordinates x, y, (z = 0)static org.apache.commons.math3.geometry.euclidean.threed.Vector3DPolarToCartesian(double theta, double rho, double z) Polar coordinates theta, rho, z to Cartesian coordinates x,y,zstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DPolarToCartesian(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Polar coordinates theta, rho, (z = 0) to Cartesian coordinates x, y, zstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DSphericalToCartesian(double theta, double phi, double radius) Spherical Coordinates to Cartesian Coordinatesstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DSphericalToCartesian(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Spherical Coordinates to Cartesian Coordinatesstatic org.apache.commons.math3.geometry.euclidean.threed.Vector3DXYZToLonLatRadius(double x, double y, double z) A convenience method to allow CartesianToSpherical conversion from X,Y,Z to longitude, latitude (DEGREES) and radius NOTE: units of xyz (e.g.static org.apache.commons.math3.geometry.euclidean.threed.Vector3DXYZToLonLatRadius(org.apache.commons.math3.geometry.euclidean.threed.Vector3D xyzpoint) A convenience method to allow CartesianToSpherical conversion from X,Y,Z to longitude, latitude (DEGREES) and radius
-
Field Details
-
RADIANS_TO_DEGREES
public static final double RADIANS_TO_DEGREES- See Also:
-
DEGREES_TO_RADIANS
public static final double DEGREES_TO_RADIANS- See Also:
-
-
Constructor Details
-
CoordinateTransform
public CoordinateTransform()
-
-
Method Details
-
SphericalToCartesian
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D SphericalToCartesian(double theta, double phi, double radius) Spherical Coordinates to Cartesian Coordinates- Parameters:
theta- angle x to y (a.k.a. longitude in RADIANS)phi- angle from x-y plane to z (a.k.a. latitude in RADIANS)radius- length of the vector from the origin at (0,0,0)- Returns:
- a Point3d object in Cartesian coordinates
-
SphericalToCartesian
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D SphericalToCartesian(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Spherical Coordinates to Cartesian Coordinates- Parameters:
point- - a Point3d object in format point.x = theta, point.y = phi, point.z = radius Note theta and phi need to be in RADIANS- Returns:
- a Point3d object in cartesian x,y,z coordinates
-
CartesianToSpherical
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D CartesianToSpherical(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Cartesian coordinates x,y,z to Spherical coordinates theta, phi, r- Parameters:
point- a Point3d object x,y,z- Returns:
- a Point3d object in format point.x = theta, point.y = phi, point.z = radius (theta and phi in RADIANS)
-
CartesianToSpherical
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D CartesianToSpherical(double x, double y, double z) Cartesian coordinates x,y,z to Spherical coordinates theta, phi, r- Parameters:
x-y-z-- Returns:
- a Point3d object in format point.x = theta, point.y = phi, point.z = r (theta and phi in RADIANS)
-
CartesianToPolar
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D CartesianToPolar(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Cartesian coordinates x,y,z to Polar coordinates theta, rho, z- Parameters:
point- a Point3d object x,y,z- Returns:
- a Point3d object in format point.x = theta, point.y = rho, point.z = z
-
CartesianToPolar
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D CartesianToPolar(double x, double y, double z) Cartesian coordinates x,y,z to Polar coordinates theta, rho, z- Parameters:
x-y-z-- Returns:
- a Point3d object in format point.x = theta, point.y = rho, point.z = z
-
CartesianToPolar
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D CartesianToPolar(double x, double y) Cartesian coordinates x,y to Polar coordinates theta, phi, z = 0- Parameters:
x-y-- Returns:
- a Point3d object in format point.x = theta, point.y = rho, point.z = z
-
PolarToCartesian
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D PolarToCartesian(double theta, double rho, double z) Polar coordinates theta, rho, z to Cartesian coordinates x,y,z- Parameters:
theta- angle from x to yrho- distance from origin (0,0,0)z- distance along the z-axis- Returns:
- a Point3d object (x,y,z)
-
PolarToCartesian
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D PolarToCartesian(double theta, double rho) Polar coordinates theta, rho, (z = 0) to Cartesian coordinates x, y, (z = 0)- Parameters:
theta- angle from x to yrho- distance from origin (0,0)- Returns:
- a Point3d object (x,y,0)
-
PolarToCartesian
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D PolarToCartesian(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point) Polar coordinates theta, rho, (z = 0) to Cartesian coordinates x, y, z- Parameters:
point- a Point3d object in format point.x = theta, point.y = rho, point.z = z- Returns:
- a Point3d object (x,y,z)
-
LonLatRadiusToXYZ
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D LonLatRadiusToXYZ(double longitude, double latitude, double radius) A convenience method to allow SphericalToCartesian conversion from longitude, latitude (DEGREES) instead of theta,phi (RADIANS)- Parameters:
longitude- - the longitude in DEGREESlatitude- - the latitude in DEGREESradius- - the radius to the point in space NOTE: units of radius (e.g. meters, km, miles) determine the units of XYZ- Returns:
- a Point3d object (x,y,z)
-
LonLatRadiusToXYZ
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D LonLatRadiusToXYZ(org.apache.commons.math3.geometry.euclidean.threed.Vector3D lonlatradpoint) A convenience method to allow SphericalToCartesian conversion from longitude, latitude (DEGREES) instead of theta,phi (RADIANS) NOTE: units of radius (e.g. meters, km, miles) determine the units of XYZ- Parameters:
lonlatradpoint- = a Point3d object (longitude, latitude, radius)- Returns:
- a Point3d object (x,y,z)
-
XYZToLonLatRadius
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D XYZToLonLatRadius(double x, double y, double z) A convenience method to allow CartesianToSpherical conversion from X,Y,Z to longitude, latitude (DEGREES) and radius NOTE: units of xyz (e.g. meters, km, miles) determine the units of radius- Parameters:
x-y-z-- Returns:
- a Point3d object (longitude, latitude, radius)
-
XYZToLonLatRadius
public static org.apache.commons.math3.geometry.euclidean.threed.Vector3D XYZToLonLatRadius(org.apache.commons.math3.geometry.euclidean.threed.Vector3D xyzpoint) A convenience method to allow CartesianToSpherical conversion from X,Y,Z to longitude, latitude (DEGREES) and radius- Parameters:
xyzpoint- - a Point3d object (X, Y, Z)- Returns:
- a Point3d object (longitude, latitude, radius)
-
GeodeticToGeocentricLatitude
public static double GeodeticToGeocentricLatitude(double geodeticlatitude) -
GeocentricToGeodeticLatitude
public static double GeocentricToGeodeticLatitude(double geocentriclatitude)
-