Class GeocentricTransform

    • Constructor Detail

      • GeocentricTransform

        public GeocentricTransform​(Ellipsoid ellipsoid,
                                   boolean hasHeight)
        Constructs a transform from the specified ellipsoid.
        Parameters:
        ellipsoid - The ellipsoid.
        hasHeight - true if geographic coordinates include an ellipsoidal height (i.e. are 3-D), or false if 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 - true if geographic coordinates include an ellipsoidal height (i.e. are 3-D), or false if they are only 2-D.
    • Method Detail

      • 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:
        transform in interface MathTransform
        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 than srcPts.
        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:
        transform in interface MathTransform
        Overrides:
        transform in class AbstractMathTransform
        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 than srcPts.
        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 than srcPts.
        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 than srcPts.
        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.
      • equals

        public boolean equals​(Object o)
        Description copied from class: AbstractMathTransform
        Compares the specified object with this math transform for equality. The default implementation checks if object is an instance of the same class than this and use the same parameter descriptor. Subclasses should override this method in order to compare internal fields.
        Overrides:
        equals in class AbstractMathTransform
        Parameters:
        o - The object to compare with this transform.
        Returns:
        true if the given object is a transform of the same class and if, given identical source position, the transformed position would be the equals.