/** * Creates a copy of the given {@link FXYSum fxySum}. * * @param fxySum the {@link FXYSum} to copy * * @return a copy of the given {@link FXYSum} */ public static FXYSum createCopy(final FXYSum fxySum) { final double[] coefficients = new double[fxySum.getCoefficients().length]; System.arraycopy(fxySum.getCoefficients(), 0, coefficients, 0, coefficients.length); final FXYSum fxySumCopy = new FXYSum(fxySum.getFunctions(), fxySum.getOrder(), coefficients); return fxySumCopy; }
" </Geoposition_Insert>" + LS + " <Simplified_Location_Model>" + LS + " <Direct_Location_Model order=\"" + geoCoding1.getPixelXFunction().getOrder() + "\">" + LS + " <lc_List>" + LS + " <lc index=\"0\">" + lonCoefficients1[0] + "</lc>" + LS + " </pc_List>" + LS + " </Direct_Location_Model>" + LS + " <Reverse_Location_Model order=\"" + geoCoding1.getLatFunction().getOrder() + "\">" + LS + " <ic_List>" + LS + " <ic index=\"0\">" + xCoefficients1[0] + "</ic>" + LS + " </Geoposition_Insert>" + LS + " <Simplified_Location_Model>" + LS + " <Direct_Location_Model order=\"" + geoCoding2.getPixelXFunction().getOrder() + "\">" + LS + " <lc_List>" + LS + " <lc index=\"0\">" + lonCoefficients2[0] + "</lc>" + LS + " </pc_List>" + LS + " </Direct_Location_Model>" + LS + " <Reverse_Location_Model order=\"" + geoCoding2.getLatFunction().getOrder() + "\">" + LS + " <ic_List>" + LS + " <ic index=\"0\">" + xCoefficients2[0] + "</ic>" + LS + " </Geoposition_Insert>" + LS + " <Simplified_Location_Model>" + LS + " <Direct_Location_Model order=\"" + geoCoding2.getPixelXFunction().getOrder() + "\">" + LS + " <lc_List>" + LS + " <lc index=\"0\">" + lonCoefficients1[0] + "</lc>" + LS +
" </Geoposition_Insert>" + LS + " <Simplified_Location_Model>" + LS + " <Direct_Location_Model order=\"" + lambdaFunction.getOrder() + "\">" + LS + " <lc_List>" + LS + " <lc index=\"0\">" + lambdaCoefficients[0] + "</lc>" + LS + " </pc_List>" + LS + " </Direct_Location_Model>" + LS + " <Reverse_Location_Model order=\"" + xFunction.getOrder() + "\">" + LS + " <ic_List>" + LS + " <ic index=\"0\">" + xCoefficients[0] + "</ic>" + LS + " <ic index=\"1\">" + xCoefficients[1] + "</ic>" + LS +
for (int i = 0; i < potentialPolynomials.length; i++) { FXYSum potentialPolynomial = potentialPolynomials[i]; final int order = potentialPolynomial.getOrder(); final int numPointsRequired; if (order >= 0) {
private void assertEqual(final FXYGeoCoding expectedGeoCoding, final FXYGeoCoding actualGeoCoding) { assertEquals(expectedGeoCoding.getDatum().getName(), actualGeoCoding.getDatum().getName()); assertEquals(expectedGeoCoding.getDatum().getEllipsoid().getName(), actualGeoCoding.getDatum().getEllipsoid().getName()); assertEquals(expectedGeoCoding.getDatum().getEllipsoid().getSemiMajor(), actualGeoCoding.getDatum().getEllipsoid().getSemiMajor(), 1.0e-6); assertEquals(expectedGeoCoding.getDatum().getEllipsoid().getSemiMinor(), actualGeoCoding.getDatum().getEllipsoid().getSemiMinor(), 1.0e-6); assertEquals(expectedGeoCoding.getLatFunction().getOrder(), actualGeoCoding.getLatFunction().getOrder()); assertTrue(ArrayUtils.equalArrays(expectedGeoCoding.getLatFunction().getCoefficients(), actualGeoCoding.getLatFunction().getCoefficients(), 1.0e-6)); assertEquals(expectedGeoCoding.getLonFunction().getOrder(), actualGeoCoding.getLonFunction().getOrder()); assertTrue(ArrayUtils.equalArrays(expectedGeoCoding.getLonFunction().getCoefficients(), actualGeoCoding.getLonFunction().getCoefficients(), 1.0e-6)); assertEquals(expectedGeoCoding.getPixelXFunction().getOrder(), actualGeoCoding.getPixelXFunction().getOrder()); assertTrue(ArrayUtils.equalArrays(expectedGeoCoding.getPixelXFunction().getCoefficients(), actualGeoCoding.getPixelXFunction().getCoefficients(), 1.0e-6)); assertEquals(expectedGeoCoding.getPixelYFunction().getOrder(), actualGeoCoding.getPixelYFunction().getOrder()); assertTrue(ArrayUtils.equalArrays(expectedGeoCoding.getPixelYFunction().getCoefficients(), actualGeoCoding.getPixelYFunction().getCoefficients(), 1.0e-6)); assertEquals(expectedGeoCoding.getPixelOffsetX(), actualGeoCoding.getPixelOffsetX(), 1.0e-6); assertEquals(expectedGeoCoding.getPixelOffsetY(), actualGeoCoding.getPixelOffsetY(), 1.0e-6); assertEquals(expectedGeoCoding.getPixelSizeX(), actualGeoCoding.getPixelSizeX(), 1.0e-6); assertEquals(expectedGeoCoding.getPixelSizeY(), actualGeoCoding.getPixelSizeY(), 1.0e-6); }
" </Geoposition_Insert>" + LS + " <Simplified_Location_Model>" + LS + " <Direct_Location_Model order=\"" + fxyGeoCoding.getPixelXFunction().getOrder() + "\">" + LS + " <lc_List>" + LS + " <lc index=\"0\">" + _lonCoefficients[0] + "</lc>" + LS + " </pc_List>" + LS + " </Direct_Location_Model>" + LS + " <Reverse_Location_Model order=\"" + fxyGeoCoding.getLatFunction().getOrder() + "\">" + LS + " <ic_List>" + LS + " <ic index=\"0\">" + _xCoefficients[0] + "</ic>" + LS +
println(slmTags[0]); final int directOrder = fxyGeoCoding.getLatFunction().getOrder(); final int reverseOrder = fxyGeoCoding.getPixelXFunction().getOrder(); final double[] lambdaCoeffs = fxyGeoCoding.getLonFunction().getCoefficients(); final double[] phiCoeffs = fxyGeoCoding.getLatFunction().getCoefficients();