src/main/java/ucar/geoapi/NetcdfProjection.java
@Override
    public void transform(float[] srcPts, int srcOff, final float[] dstPts, int dstOff, int numPts)
            throws TransformException
    {
        final int srcDim = getSourceDimensions();
        final int dstDim = getTargetDimensions();
        final SimpleDirectPosition ptSrc = new SimpleDirectPosition(srcDim);
        final SimpleDirectPosition ptDst = new SimpleDirectPosition(dstDim);
        if (srcPts == dstPts && needsCopy(srcOff, srcDim, dstOff, dstDim, numPts)) {
            srcPts = Arrays.copyOfRange(srcPts, srcOff, srcOff + srcDim*numPts);
            srcOff = 0;
        }
        while (--numPts >= 0) {
            arraycopy(srcPts, srcOff, ptSrc.coordinates, 0, srcDim);
            transform(ptSrc, ptDst);
            arraycopy(ptDst.coordinates, 0, dstPts, dstOff, dstDim);
            srcOff += srcDim;
            dstOff += dstDim;
        }
    }
/**
     * Transforms a list of coordinate point ordinal values.
     *
     * @param  srcPts  the array containing the source point coordinates.
     * @param  srcOff  the offset to the first point to be transformed in the source array.
     * @param  dstPts  the array into which the transformed point coordinates are returned. May be the same than {@code srcPts}.
     * @param  dstOff  the offset to the location of the first transformed point that is stored in the destination array.
     * @param  numPts  the number of point objects to be transformed.
     * @throws TransformException if a point can not be transformed.
     */
Transforms a list of coordinate point ordinal values.
@param  srcPts  the array containing the source point coordinates.
@param  srcOff  the offset to the first point to be transformed in the source array.
@param  dstPts  the array into which the transformed point coordinates are returned. May be the same than  srcPts.
@param  dstOff  the offset to the location of the first transformed point that is stored in the destination array.
@param  numPts  the number of point objects to be transformed.
@throws TransformException if a point can not be transformed.
Transforms a list of coordinate point ordinal values . @param srcPts the array containing the source point coordinates . @param srcOff the offset to the first point to be transformed in the source array . @param dstPts the array into which the transformed point coordinates are returned . May be the same than srcPts . @param dstOff the offset to the location of the first transformed point that is stored in the destination array . @param numPts the number of point objects to be transformed . @throws TransformException if a point can not be transformed .
@Override
    public void transform(float[] srcPts, int srcOff, final float[] dstPts, int dstOff, int numPts)
            throws TransformException
    {
        final int srcDim = getSourceDimensions();
        final int dstDim = getTargetDimensions();
        final SimpleDirectPosition ptSrc = new SimpleDirectPosition(srcDim);
        final SimpleDirectPosition ptDst = new SimpleDirectPosition(dstDim);
        if (srcPts == dstPts && needsCopy(srcOff, srcDim, dstOff, dstDim, numPts)) {
            srcPts = Arrays.copyOfRange(srcPts, srcOff, srcOff + srcDim*numPts);
            srcOff = 0;
        }
        while (--numPts >= 0) {
            arraycopy(srcPts, srcOff, ptSrc.coordinates, 0, srcDim);
            transform(ptSrc, ptDst);
            arraycopy(ptDst.coordinates, 0, dstPts, dstOff, dstDim);
            srcOff += srcDim;
            dstOff += dstDim;
        }
    }
@ Override public void transform ( float [ ] srcPts , int srcOff , final float [ ] dstPts , int dstOff , int numPts ) throws TransformException { final int srcDim = getSourceDimensions ( ) ; final int dstDim = getTargetDimensions ( ) ; final SimpleDirectPosition ptSrc = new SimpleDirectPosition ( srcDim ) ; final SimpleDirectPosition ptDst = new SimpleDirectPosition ( dstDim ) ; if ( srcPts == dstPts && needsCopy ( srcOff , srcDim , dstOff , dstDim , numPts ) ) { srcPts = Arrays . copyOfRange ( srcPts , srcOff , srcOff + srcDim * numPts ) ; srcOff = 0 ; } while ( -- numPts >= 0 ) { arraycopy ( srcPts , srcOff , ptSrc . coordinates , 0 , srcDim ) ; transform ( ptSrc , ptDst ) ; arraycopy ( ptDst . coordinates , 0 , dstPts , dstOff , dstDim ) ; srcOff += srcDim ; dstOff += dstDim ; } }
Transforms a list of coordinate point ordinal values.
Transforms a list of coordinate point ordinal values .