Class NTv2Transform

    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
        Logger
    • Constructor Detail

      • NTv2Transform

        public NTv2Transform​(URI file)
                      throws NoSuchIdentifierException
        Constructs a NTv2Transform from the specified grid shift file.

        This constructor checks for grid shift file availability, but doesn't actually load the full grid into memory to preserve resources.

        Parameters:
        file - NTv2 grid file name
        Throws:
        NoSuchIdentifierException - if the grid is not available.
    • Method Detail

      • equals

        public boolean equals​(Object object)
        Compares the specified object with this one for equality. Checks if object is this same instance, or a NTv2Transform with the same parameter values.
        Overrides:
        equals in class AbstractMathTransform
        Parameters:
        object - The object to compare with this transform.
        Returns:
        true if the given object is this, or a NTv2Transform with same parameter values, which would mean that given identical source position, the transformed position would be the same.
      • transform

        public void transform​(double[] srcPts,
                              int srcOff,
                              double[] dstPts,
                              int dstOff,
                              int numPts)
                       throws TransformException
        Transforms a list of coordinate point ordinal values. This method is provided for efficiently transforming many points. The supplied array of ordinal values will contain packed ordinal values. For example, if the source dimension is 3, then the ordinals will be packed in this order: (x0,y0,z0,

        x1,y1,z1 ...).

        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.
        Throws:
        TransformException - if an IO error occurs reading the grid file.
      • inverseTransform

        public void inverseTransform​(double[] srcPts,
                                     int srcOff,
                                     double[] dstPts,
                                     int dstOff,
                                     int numPts)
                              throws TransformException
        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.
        Throws:
        TransformException - if an IO error occurs reading the grid file.