Class GeocentricTransform
Object
Formattable
AbstractMathTransform
GeocentricTransform
- All Implemented Interfaces:
Serializable,MathTransform
Transforms three dimensional geographic points to
geocentric coordinate points. Input points must be
longitudes, latitudes and heights above the ellipsoid.
- Since:
- 2.0
- Author:
- Frank Warmerdam, Martin Desruisseaux (IRD)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe provider forGeocentricTransform.static classThe provider for inverse ofGeocentricTransform. -
Field Summary
Fields inherited from class Formattable
SINGLE_LINE -
Constructor Summary
ConstructorsConstructorDescriptionGeocentricTransform(double semiMajor, double semiMinor, Unit<Length> units, boolean hasHeight) Constructs a transform from the specified parameters.GeocentricTransform(Ellipsoid ellipsoid, boolean hasHeight) Constructs a transform from the specified ellipsoid. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified object with this math transform for equality.Returns the parameter descriptors for this math transform.Returns the parameter values for this math transform.intGets the dimension of input points, which is 2 or 3.final intGets the dimension of output points, which is 3.inthashCode()Returns a hash value for this transform.inverse()Returns the inverse of this transform.voidinverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Converts geocentric coordinates (x, y, z) to geodetic coordinates (longitude, latitude, height), according to the current ellipsoid parameters.voidinverseTransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Converts geocentric coordinates (x, y, z) to geodetic coordinates (longitude, latitude, height), according to the current ellipsoid parameters.voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Converts geodetic coordinates (longitude, latitude, height) to geocentric coordinates (x, y, z) according to the current ellipsoid parameters.voidtransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Converts geodetic coordinates (longitude, latitude, height) to geocentric coordinates (x, y, z) according to the current ellipsoid parameters.Methods inherited from class AbstractMathTransform
createTransformedShape, derivative, derivative, ensureNonNull, formatWKT, getName, isIdentity, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transformMethods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface MathTransform
toWKT
-
Constructor Details
-
GeocentricTransform
Constructs a transform from the specified ellipsoid.- Parameters:
ellipsoid- The ellipsoid.hasHeight-trueif geographic coordinates include an ellipsoidal height (i.e. are 3-D), orfalseif they are only 2-D.
-
GeocentricTransform
public GeocentricTransform(double semiMajor, double semiMinor, Unit<Length> units, boolean hasHeight) Constructs a transform from the specified parameters.- Parameters:
semiMajor- The semi-major axis length.semiMinor- The semi-minor axis length.units- The axis units.hasHeight-trueif geographic coordinates include an ellipsoidal height (i.e. are 3-D), orfalseif they are only 2-D.
-
-
Method Details
-
getParameterDescriptors
Returns the parameter descriptors for this math transform.- Overrides:
getParameterDescriptorsin classAbstractMathTransform- Returns:
- The parameter descriptors for this math transform, or
null. - See Also:
-
getParameterValues
Returns the parameter values for this math transform.- Overrides:
getParameterValuesin classAbstractMathTransform- Returns:
- A copy of the parameter values for this math transform.
- See Also:
-
getSourceDimensions
public int getSourceDimensions()Gets the dimension of input points, which is 2 or 3.- Specified by:
getSourceDimensionsin interfaceMathTransform- Specified by:
getSourceDimensionsin classAbstractMathTransform- Returns:
- The dimension of input points.
-
getTargetDimensions
public final int getTargetDimensions()Gets the dimension of output points, which is 3.- Specified by:
getTargetDimensionsin interfaceMathTransform- Specified by:
getTargetDimensionsin classAbstractMathTransform- Returns:
- The dimension of output points.
-
transform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Converts geodetic coordinates (longitude, latitude, height) to geocentric coordinates (x, y, z) according to the current ellipsoid parameters.- Specified by:
transformin interfaceMathTransform- Parameters:
srcPts- the array containing the source point coordinates.srcOff- the offset to the first point to be transformed in the source array.dstPts- the array into which the transformed point coordinates are returned. May be the same thansrcPts.dstOff- the offset to the location of the first transformed point that is stored in the destination array.numPts- the number of point objects to be transformed.
-
transform
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Converts geodetic coordinates (longitude, latitude, height) to geocentric coordinates (x, y, z) according to the current ellipsoid parameters.- Specified by:
transformin interfaceMathTransform- Overrides:
transformin classAbstractMathTransform- Parameters:
srcPts- the array containing the source point coordinates.srcOff- the offset to the first point to be transformed in the source array.dstPts- the array into which the transformed point coordinates are returned. May be the same thansrcPts.dstOff- the offset to the location of the first transformed point that is stored in the destination array.numPts- the number of point objects to be transformed.
-
inverseTransform
public void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Converts geocentric coordinates (x, y, z) to geodetic coordinates (longitude, latitude, height), according to the current ellipsoid parameters. The method used here is derived from "An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion", by Ralph Toms, Feb 1996.- Parameters:
srcPts- the array containing the source point coordinates.srcOff- the offset to the first point to be transformed in the source array.dstPts- the array into which the transformed point coordinates are returned. May be the same thansrcPts.dstOff- the offset to the location of the first transformed point that is stored in the destination array.numPts- the number of point objects to be transformed.
-
inverseTransform
public void inverseTransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Converts geocentric coordinates (x, y, z) to geodetic coordinates (longitude, latitude, height), according to the current ellipsoid parameters. The method used here is derived from "An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion", by Ralph Toms, Feb 1996.- Parameters:
srcPts- the array containing the source point coordinates.srcOff- the offset to the first point to be transformed in the source array.dstPts- the array into which the transformed point coordinates are returned. May be the same thansrcPts.dstOff- the offset to the location of the first transformed point that is stored in the destination array.numPts- the number of point objects to be transformed.
-
inverse
Returns the inverse of this transform.- Specified by:
inversein interfaceMathTransform- Overrides:
inversein classAbstractMathTransform- Returns:
- The inverse transform.
-
equals
Description copied from class:AbstractMathTransformCompares the specified object with this math transform for equality. The default implementation checks ifobjectis an instance of the same class thanthisand use the same parameter descriptor. Subclasses should override this method in order to compare internal fields.- Overrides:
equalsin classAbstractMathTransform- Parameters:
o- The object to compare with this transform.- Returns:
trueif the given object is a transform of the same class and if, given identical source position, the transformed position would be the equals.
-
hashCode
public int hashCode()Description copied from class:AbstractMathTransformReturns a hash value for this transform.- Overrides:
hashCodein classAbstractMathTransform
-