Class CoordinateTransform

java.lang.Object
llnl.gnem.core.util.Geometry.CoordinateTransform

public class CoordinateTransform extends Object
User: Eric Matzel Date: Mar 23, 2010
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
     
    static final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    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
    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
    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
    static double
    GeocentricToGeodeticLatitude(double geocentriclatitude)
     
    static double
    GeodeticToGeocentricLatitude(double geodeticlatitude)
     
    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)
    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.
    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)
    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
    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
    static org.apache.commons.math3.geometry.euclidean.threed.Vector3D
    SphericalToCartesian(double theta, double phi, double radius)
    Spherical Coordinates to Cartesian Coordinates
    static org.apache.commons.math3.geometry.euclidean.threed.Vector3D
    SphericalToCartesian(org.apache.commons.math3.geometry.euclidean.threed.Vector3D point)
    Spherical Coordinates to Cartesian Coordinates
    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.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 y
      rho - 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 y
      rho - 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 DEGREES
      latitude - - the latitude in DEGREES
      radius - - 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)