Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -16,10 +16,11 @@ */ package org.apache.sis.referencing.operation.matrix; +import java.util.Objects; import org.opengis.geometry.Envelope; import org.opengis.geometry.DirectPosition; import org.opengis.referencing.cs.AxisDirection; -import org.opengis.referencing.cs.CoordinateSystem; // For javadoc +import org.opengis.referencing.cs.CoordinateSystem; // For javadoc import org.opengis.referencing.operation.Matrix; import org.opengis.referencing.operation.MathTransform; import org.opengis.geometry.MismatchedDimensionException; @@ -34,9 +35,6 @@ import org.apache.sis.internal.metadata. import org.apache.sis.internal.referencing.Resources; import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix; -// Branch-dependent imports -import java.util.Objects; - /** * {@link Matrix} factory methods and utilities. @@ -96,10 +94,10 @@ public final class Matrices extends Stat * {@value org.apache.sis.referencing.operation.matrix.Matrix4#SIZE} inclusive, the matrix * is guaranteed to be an instance of one of {@link Matrix1} … {@link Matrix4} subtypes. * - * @param size Numbers of row and columns. For an affine transform matrix, this is the number of + * @param size numbers of row and columns. For an affine transform matrix, this is the number of * {@linkplain MathTransform#getSourceDimensions() source} and * {@linkplain MathTransform#getTargetDimensions() target} dimensions + 1. - * @return An identity matrix of the given size. + * @return an identity matrix of the given size. */ public static MatrixSIS createIdentity(final int size) { switch (size) { @@ -271,8 +269,10 @@ public final class Matrices extends Stat */ final boolean same = srcDir.equals(dstDir); if (useEnvelopes) { - // See the comment in transform(Envelope, Envelope) for an explanation about why - // we use the lower/upper corners instead than getMinimum()/getMaximum() methods. + /* + * See the comment in transform(Envelope, Envelope) for an explanation about why + * we use the lower/upper corners instead than getMinimum()/getMaximum() methods. + */ final DoubleDouble scale = new DoubleDouble(same ? +1 : -1, 0); scale.multiply(dstEnvelope.getSpan(dstIndex)); scale.divide (srcEnvelope.getSpan(srcIndex)); @@ -544,7 +544,7 @@ public final class Matrices extends Stat * @param sourceDimensions the number of dimensions in source coordinates. * @param selectedDimensions the 0-based indices of source ordinate values to keep. * The length of this array will be the number of dimensions in target coordinates. - * @return An affine transform matrix keeping only the given source dimensions, and discarding all others. + * @return an affine transform matrix keeping only the given source dimensions, and discarding all others. * @throws IllegalArgumentException if a value of {@code selectedDimensions} is lower than 0 * or not smaller than {@code sourceDimensions}. * @@ -1075,13 +1075,13 @@ public final class Matrices extends Stat public static String toString(final Matrix matrix) { final int numRow = matrix.getNumRow(); final int numCol = matrix.getNumCol(); - final String[] elements = new String [numCol * numRow]; // String representation of matrix values. - final boolean[] noFractionDigits = new boolean[numCol * numRow]; // Whether to remove the trailing ".0" for a given number. - final boolean[] hasDecimalSeparator = new boolean[numCol]; // Whether the column has at least one number where fraction digits are shown. - final byte[] maximumFractionDigits = new byte [numCol]; // The greatest amount of fraction digits found in a column. - final byte[] maximumPaddingZeros = new byte [numCol * numRow]; // Maximal amount of zeros that we can append before to exceed the IEEE 754 accuracy. - final byte[] widthBeforeFraction = new byte [numCol]; // Number of characters before the fraction digits: spacing + ('-') + integerDigits + '.' - final byte[] columnWidth = new byte [numCol]; // Total column width. + final String[] elements = new String [numCol * numRow]; // String representation of matrix values. + final boolean[] noFractionDigits = new boolean[numCol * numRow]; // Whether to remove the trailing ".0" for a given number. + final boolean[] hasDecimalSeparator = new boolean[numCol]; // Whether the column has at least one number where fraction digits are shown. + final byte[] maximumFractionDigits = new byte [numCol]; // The greatest amount of fraction digits found in a column. + final byte[] maximumPaddingZeros = new byte [numCol * numRow]; // Maximal amount of zeros that we can append before to exceed the IEEE 754 accuracy. + final byte[] widthBeforeFraction = new byte [numCol]; // Number of characters before the fraction digits: spacing + ('-') + integerDigits + '.' + final byte[] columnWidth = new byte [numCol]; // Total column width. int totalWidth = 1; /* * Create now the string representation of all matrix elements and measure the width Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -38,6 +38,7 @@ import org.apache.sis.internal.util.Nume * @see Matrix3 * @see Matrix4 */ +@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone. public final class Matrix1 extends MatrixSIS { /** * Serial number for inter-operability with different versions. @@ -64,7 +65,7 @@ public final class Matrix1 extends Matri /** * Creates a new matrix filled with only zero values. * - * @param ignore Shall always be {@code false} in current version. + * @param ignore shall always be {@code false} in current version. */ Matrix1(final boolean ignore) { } @@ -82,8 +83,8 @@ public final class Matrix1 extends Matri * Creates a new matrix initialized to the specified values. * The length of the given array must be 1. * - * @param elements Elements of the matrix. - * @throws IllegalArgumentException If the given array does not have the expected length. + * @param elements elements of the matrix. + * @throws IllegalArgumentException if the given array does not have the expected length. * * @see #setElements(double[]) * @see Matrices#create(int, int, double[]) @@ -97,7 +98,7 @@ public final class Matrix1 extends Matri * The specified matrix size must be {@value #SIZE}×{@value #SIZE}. * This is not verified by this constructor, since it shall be verified by {@link Matrices}. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ Matrix1(final Matrix matrix) { m00 = matrix.getElement(0,0); @@ -108,10 +109,10 @@ public final class Matrix1 extends Matri * is already an instance of {@code Matrix1}, then it is returned unchanged. Otherwise this method * verifies the matrix size, then copies the element in a new {@code Matrix1} object. * - * @param matrix The matrix to cast or copy, or {@code null}. - * @return The matrix argument if it can be safely casted (including {@code null} argument), + * @param matrix the matrix to cast or copy, or {@code null}. + * @return the matrix argument if it can be safely casted (including {@code null} argument), * or a copy of the given matrix otherwise. - * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. + * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. */ public static Matrix1 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException { if (matrix == null || matrix instanceof Matrix1) { @@ -133,7 +134,7 @@ public final class Matrix1 extends Matri /** * Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumRow() { @@ -143,7 +144,7 @@ public final class Matrix1 extends Matri /** * Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumCol() { @@ -156,9 +157,9 @@ public final class Matrix1 extends Matri * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be read directly for efficiency. * - * @param row The row index, which can only be 0. - * @param column The column index, which can only be 0. - * @return The current value. + * @param row the row index, which can only be 0. + * @param column the column index, which can only be 0. + * @return the current value. */ @Override public final double getElement(final int row, final int column) { @@ -175,9 +176,9 @@ public final class Matrix1 extends Matri * If the matrix is known to be an instance of {@code Matrix1}, * then the {@link #m00} field can be set directly for efficiency. * - * @param row The row index, which can only be 0. - * @param column The column index, which can only be 0. - * @param value The new value to set. + * @param row the row index, which can only be 0. + * @param column the column index, which can only be 0. + * @param value the new value to set. */ @Override public final void setElement(final int row, final int column, final double value) { @@ -261,7 +262,7 @@ public final class Matrix1 extends Matri * Returns {@code true} if the specified object is of type {@code Matrix1} and * all of the data members are equal to the corresponding data members in this matrix. * - * @param object The object to compare with this matrix for equality. + * @param object the object to compare with this matrix for equality. * @return {@code true} if the given object is equal to this matrix. */ @Override Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -39,6 +39,7 @@ import org.apache.sis.internal.util.Nume * @see Matrix3 * @see Matrix4 */ +@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone. public final class Matrix2 extends MatrixSIS { /** * Serial number for inter-operability with different versions. @@ -65,7 +66,7 @@ public final class Matrix2 extends Matri /** * Creates a new matrix filled with only zero values. * - * @param ignore Shall always be {@code false} in current version. + * @param ignore shall always be {@code false} in current version. */ Matrix2(final boolean ignore) { } @@ -73,10 +74,10 @@ public final class Matrix2 extends Matri /** * Creates a new matrix initialized to the specified values. * - * @param m00 The first matrix element in the first row. - * @param m01 The second matrix element in the first row. - * @param m10 The first matrix element in the second row. - * @param m11 The second matrix element in the second row. + * @param m00 the first matrix element in the first row. + * @param m01 the second matrix element in the first row. + * @param m10 the first matrix element in the second row. + * @param m11 the second matrix element in the second row. */ public Matrix2(final double m00, final double m01, final double m10, final double m11) @@ -89,8 +90,8 @@ public final class Matrix2 extends Matri * Creates a new matrix initialized to the specified values. * The length of the given array must be 4 and the values in the same order than the above constructor. * - * @param elements Elements of the matrix. Column indices vary fastest. - * @throws IllegalArgumentException If the given array does not have the expected length. + * @param elements elements of the matrix. Column indices vary fastest. + * @throws IllegalArgumentException if the given array does not have the expected length. * * @see #setElements(double[]) * @see Matrices#create(int, int, double[]) @@ -104,7 +105,7 @@ public final class Matrix2 extends Matri * The specified matrix size must be {@value #SIZE}×{@value #SIZE}. * This is not verified by this constructor, since it shall be verified by {@link Matrices}. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ Matrix2(final Matrix matrix) { m00 = matrix.getElement(0,0); @@ -118,10 +119,10 @@ public final class Matrix2 extends Matri * is already an instance of {@code Matrix2}, then it is returned unchanged. Otherwise this method * verifies the matrix size, then copies all elements in a new {@code Matrix2} object. * - * @param matrix The matrix to cast or copy, or {@code null}. - * @return The matrix argument if it can be safely casted (including {@code null} argument), + * @param matrix the matrix to cast or copy, or {@code null}. + * @return the matrix argument if it can be safely casted (including {@code null} argument), * or a copy of the given matrix otherwise. - * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. + * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}×{@value #SIZE}. */ public static Matrix2 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException { if (matrix == null || matrix instanceof Matrix2) { @@ -143,7 +144,7 @@ public final class Matrix2 extends Matri /** * Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumRow() { @@ -153,7 +154,7 @@ public final class Matrix2 extends Matri /** * Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation. * - * @return Always {@value #SIZE}. + * @return always {@value #SIZE}. */ @Override public final int getNumCol() { @@ -166,9 +167,9 @@ public final class Matrix2 extends Matri * If the matrix is known to be an instance of {@code Matrix2}, * then the {@link #m00} … {@link #m11} fields can be read directly for efficiency. * - * @param row The row index, which can only be 0 or 1. - * @param column The column index, which can only be 0 or 1. - * @return The current value at the given row and column. + * @param row the row index, which can only be 0 or 1. + * @param column the column index, which can only be 0 or 1. + * @return the current value at the given row and column. */ @Override public final double getElement(final int row, final int column) { @@ -189,9 +190,9 @@ public final class Matrix2 extends Matri * If the matrix is known to be an instance of {@code Matrix2}, * then the {@link #m00} … {@link #m11} fields can be set directly for efficiency. * - * @param row The row index, which can only be 0 or 1. - * @param column The column index, which can only be 0 or 1. - * @param value The new value to set at the given row and column. + * @param row the row index, which can only be 0 or 1. + * @param column the column index, which can only be 0 or 1. + * @param value the new value to set at the given row and column. */ @Override public final void setElement(final int row, final int column, final double value) { @@ -285,7 +286,7 @@ public final class Matrix2 extends Matri * Returns {@code true} if the specified object is of type {@code Matrix2} and * all of the data members are equal to the corresponding data members in this matrix. * - * @param object The object to compare with this matrix for equality. + * @param object the object to compare with this matrix for equality. * @return {@code true} if the given object is equal to this matrix. */ @Override Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -38,6 +38,7 @@ import org.opengis.referencing.operation * @see Matrix2 * @see Matrix4 */ +@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone. public final class Matrix3 extends MatrixSIS { /** * Serial number for inter-operability with different versions. @@ -69,7 +70,7 @@ public final class Matrix3 extends Matri /** * Creates a new matrix filled with only zero values. * - * @param ignore Shall always be {@code false} in current version. + * @param ignore shall always be {@code false} in current version. */ Matrix3(final boolean ignore) { } @@ -77,15 +78,15 @@ public final class Matrix3 extends Matri /** * Creates a new matrix initialized to the specified values. * - * @param m00 The first matrix element in the first row. - * @param m01 The second matrix element in the first row. - * @param m02 The third matrix element in the first row. - * @param m10 The first matrix element in the second row. - * @param m11 The second matrix element in the second row. - * @param m12 The third matrix element in the second row. - * @param m20 The first matrix element in the third row. - * @param m21 The second matrix element in the third row. - * @param m22 The third matrix element in the third row. + * @param m00 the first matrix element in the first row. + * @param m01 the second matrix element in the first row. + * @param m02 the third matrix element in the first row. + * @param m10 the first matrix element in the second row. + * @param m11 the second matrix element in the second row. + * @param m12 the third matrix element in the second row. + * @param m20 the first matrix element in the third row. + * @param m21 the second matrix element in the third row. + * @param m22 the third matrix element in the third row. */ public Matrix3(final double m00, final double m01, final double m02, final double m10, final double m11, final double m12, @@ -100,8 +101,8 @@ public final class Matrix3 extends Matri * Creates a new matrix initialized to the specified values. * The length of the given array must be 9 and the values in the same order than the above constructor. * - * @param elements Elements of the matrix. Column indices vary fastest. - * @throws IllegalArgumentException If the given array does not have the expected length. + * @param elements elements of the matrix. Column indices vary fastest. + * @throws IllegalArgumentException if the given array does not have the expected length. * * @see #setElements(double[]) * @see Matrices#create(int, int, double[]) @@ -115,7 +116,7 @@ public final class Matrix3 extends Matri * The specified matrix size must be {@value #SIZE}×{@value #SIZE}. * This is not verified by this constructor, since it shall be verified by {@link Matrices}. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ Matrix3(final Matrix matrix) { for (int j=0; jj == i) are set to 1. * - * @param numRow Number of rows. - * @param numCol Number of columns. - * @param setToIdentity {@code true} for initializing the matrix to the identity matrix, - * or {@code false} for leaving it initialized to zero. - * @param precision 1 for normal precision, or 2 for extended precision. + * @param numRow number of rows. + * @param numCol number of columns. + * @param setToIdentity {@code true} for initializing the matrix to the identity matrix, + * or {@code false} for leaving it initialized to zero. + * @param precision 1 for normal precision, or 2 for extended precision. */ NonSquareMatrix(final int numRow, final int numCol, final boolean setToIdentity, final int precision) { super(numRow, numCol, setToIdentity, precision); @@ -56,9 +56,9 @@ final class NonSquareMatrix extends Gene * The array values are copied in one row at a time in row major fashion. * The array shall be exactly {@code numRow*numCol} in length. * - * @param numRow Number of rows. - * @param numCol Number of columns. - * @param elements Initial values. + * @param numRow number of rows. + * @param numCol number of columns. + * @param elements initial values. */ NonSquareMatrix(final int numRow, final int numCol, final double[] elements) { super(numRow, numCol, elements); @@ -67,7 +67,7 @@ final class NonSquareMatrix extends Gene /** * Constructs a new matrix and copies the initial values from the given matrix. * - * @param matrix The matrix to copy. + * @param matrix the matrix to copy. */ NonSquareMatrix(final Matrix matrix) { super(matrix); @@ -85,9 +85,9 @@ final class NonSquareMatrix extends Gene */ @Override public void transpose() { - final short numRow = this.numRow; // Protection against accidental changes before we are done. + final short numRow = this.numRow; // Protection against accidental changes before we are done. final short numCol = this.numCol; - final int errors = indexOfErrors(numRow, numCol, elements); // Where error values start, or 0 if none. + final int errors = indexOfErrors(numRow, numCol, elements); // Where error values start, or 0 if none. final double[] copy = elements.clone(); int k = 0; for (int j=0; j= 0;) { if (elements[j] != 0) { continue next; } } - omitted[--oi] = i; // Found a column which contains only 0 elements. + omitted[--oi] = i; // Found a column which contains only 0 elements. } while (oi != 0); /* * Found enough columns containing only zero elements. Create a square matrix omitting those columns, @@ -203,7 +203,7 @@ next: do { int j = 0; for (i=0; iU = {@code Y}. * This method is an adaptation of the {@code LUDecomposition} class of the JAMA matrix package. * - * @param X The matrix to invert. - * @param Y The desired result of {@code X} × U. - * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular. + * @param X the matrix to invert. + * @param Y the desired result of {@code X} × U. + * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular. */ static MatrixSIS solve(final Matrix X, final Matrix Y) throws NoninvertibleMatrixException { final int size = X.getNumRow(); @@ -170,13 +170,13 @@ final class Solver implements Matrix { * } * } * - * @param X The matrix to invert, which must be square. - * @param Y The desired result of {@code X} × U. - * @param eltY Elements and error terms of the {@code Y} matrix, or {@code null} if not available. - * @param size The value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}. - * @param innerSize The value of {@code Y.getNumCol()}. - * @param noChange If {@code true}, do not allow modifications to the {@code X} matrix. - * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular. + * @param X the matrix to invert, which must be square. + * @param Y the desired result of {@code X} × U. + * @param eltY elements and error terms of the {@code Y} matrix, or {@code null} if not available. + * @param size the value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}. + * @param innerSize the value of {@code Y.getNumCol()}. + * @param noChange if {@code true}, do not allow modifications to the {@code X} matrix. + * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular. */ private static MatrixSIS solve(final Matrix X, final Matrix Y, final double[] eltY, final int size, final int innerSize, final boolean noChange) throws NoninvertibleMatrixException @@ -210,12 +210,14 @@ searchNaN: for (int flatIndex = (size - * that the column contains only zero values except on the current line. */ int columnOfScale = -1; - if (i != lastRowOrColumn) { // Enter only if this column is not for translations. - columnOfScale = i; // The non-translation element is the scale factor. - for (int k=lastRowOrColumn; --k>=0;) { // Scan all other rows in the current column. + if (i != lastRowOrColumn) { // Enter only if this column is not for translations. + columnOfScale = i; // The non-translation element is the scale factor. + for (int k=lastRowOrColumn; --k>=0;) { // Scan all other rows in the current column. if (k != j && LU[k*size + i] != 0) { - // Found a non-zero element in the current column. - // We can not proceed - cancel everything. + /* + * Found a non-zero element in the current column. + * We can not proceed - cancel everything. + */ indexOfNaN = null; indexCount = 0; break searchNaN; @@ -230,8 +232,10 @@ searchNaN: for (int flatIndex = (size - for (int k=lastRowOrColumn; --k>=0;) { if (k != i && LU[j*size + k] != 0) { if (columnOfScale >= 0) { - // If there is more than 1 non-zero element, - // abandon the attempt to handle NaN values. + /* + * If there is more than 1 non-zero element, + * abandon the attempt to handle NaN values. + */ indexOfNaN = null; indexCount = 0; break searchNaN; @@ -244,7 +248,7 @@ searchNaN: for (int flatIndex = (size - * Remember its index; the replacement will be performed later. */ if (indexOfNaN == null) { - indexOfNaN = new int[lastRowOrColumn * (2*TUPLE_SIZE)]; // At most one scale and one offset per row. + indexOfNaN = new int[lastRowOrColumn * (2*TUPLE_SIZE)]; // At most one scale and one offset per row. } indexOfNaN[indexCount++] = i; indexOfNaN[indexCount++] = j; @@ -307,12 +311,12 @@ searchNaN: for (int flatIndex = (size - * Y.getNumCol() == innerSize; * } * - * @param LU Elements of the {@code X} matrix to invert, including error terms. - * @param Y The desired result of {@code X} × U. - * @param eltY Elements and error terms of the {@code Y} matrix, or {@code null} if not available. - * @param size The value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}. - * @param innerSize The value of {@code Y.getNumCol()}. - * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular. + * @param LU elements of the {@code X} matrix to invert, including error terms. + * @param Y the desired result of {@code X} × U. + * @param eltY elements and error terms of the {@code Y} matrix, or {@code null} if not available. + * @param size the value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}. + * @param innerSize the value of {@code Y.getNumCol()}. + * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular. */ private static MatrixSIS solve(final double[] LU, final Matrix Y, final double[] eltY, final int size, final int innerSize) throws NoninvertibleMatrixException Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -81,8 +81,8 @@ public class AlbersEqualArea extends Equ /** * Creates an Albers Equal Area projection from the given parameters. * - * @param method Description of the projection parameters. - * @param parameters The parameter values of the projection to create. + * @param method description of the projection parameters. + * @param parameters the parameter values of the projection to create. */ public AlbersEqualArea(final OperationMethod method, final Parameters parameters) { this(initializer(method, parameters)); @@ -200,7 +200,7 @@ public class AlbersEqualArea extends Equ * is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.

* * @param factory The factory to use for creating the transform. - * @return The map projection from (λ,φ) to (x,y) coordinates. + * @return the map projection from (λ,φ) to (x,y) coordinates. * @throws FactoryException if an error occurred while creating a transform. */ @Override @@ -216,7 +216,7 @@ public class AlbersEqualArea extends Equ * Converts the specified (θ,φ) coordinate (units in radians) and stores the result in {@code dstPts}. * In addition, opportunistically computes the projection derivative if {@code derivate} is {@code true}. * - * @return The matrix of the projection derivative at the given source position, + * @return the matrix of the projection derivative at the given source position, * or {@code null} if the {@code derivate} argument is {@code false}. * @throws ProjectionException if the coordinate can not be converted. */ Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -188,8 +188,8 @@ public class CylindricalEqualArea extend *

The non-linear part of the returned transform will be {@code this} transform, except if the ellipsoid * is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.

* - * @param factory The factory to use for creating the transform. - * @return The map projection from (λ,φ) to (x,y) coordinates. + * @param factory the factory to use for creating the transform. + * @return the map projection from (λ,φ) to (x,y) coordinates. * @throws FactoryException if an error occurred while creating a transform. */ @Override @@ -206,7 +206,7 @@ public class CylindricalEqualArea extend * (linear distance on a unit sphere). In addition, opportunistically computes the projection derivative * if {@code derivate} is {@code true}. * - * @return The matrix of the projection derivative at the given source position, + * @return the matrix of the projection derivative at the given source position, * or {@code null} if the {@code derivate} argument is {@code false}. * @throws ProjectionException if the coordinate can not be converted. */ @@ -295,7 +295,7 @@ public class CylindricalEqualArea extend /** * Constructs a new map projection from the parameters of the given projection. * - * @param other The other projection (usually ellipsoidal) from which to copy the parameters. + * @param other the other projection (usually ellipsoidal) from which to copy the parameters. */ Spherical(final CylindricalEqualArea other) { super(other); Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -185,7 +185,7 @@ final class Initializer { eccentricitySquared.subtract(f); } else { final DoubleDouble rs = new DoubleDouble(b); - rs.divide(k); // rs = b/a + rs.divide(k); // rs = b/a rs.square(); eccentricitySquared.value = 1; eccentricitySquared.subtract(rs); @@ -321,9 +321,10 @@ final class Initializer { final DoubleDouble t = verbatim(sinφ); t.square(); t.multiply(eccentricitySquared); - - // Compute 1 - ℯ²⋅sin²φ. Since ℯ²⋅sin²φ may be small, - // this is where double-double arithmetic has more value. + /* + * Compute 1 - ℯ²⋅sin²φ. Since ℯ²⋅sin²φ may be small, + * this is where double-double arithmetic has more value. + */ t.negate(); t.add(1,0); return t; Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -392,7 +392,7 @@ public class LambertConicConformal exten * Converts the specified (θ,φ) coordinate (units in radians) and stores the result in {@code dstPts}. * In addition, opportunistically computes the projection derivative if {@code derivate} is {@code true}. * - * @return The matrix of the projection derivative at the given source position, + * @return the matrix of the projection derivative at the given source position, * or {@code null} if the {@code derivate} argument is {@code false}. * @throws ProjectionException if the coordinate can not be converted. */ @@ -503,7 +503,7 @@ public class LambertConicConformal exten /** * Constructs a new map projection from the parameters of the given projection. * - * @param other The other projection (usually ellipsoidal) from which to copy the parameters. + * @param other the other projection (usually ellipsoidal) from which to copy the parameters. */ protected Spherical(final LambertConicConformal other) { super(other); Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -138,8 +138,8 @@ public class Mercator extends ConformalP *
  • "Miller Cylindrical".
  • * * - * @param method Description of the projection parameters. - * @param parameters The parameter values of the projection to create. + * @param method description of the projection parameters. + * @param parameters the parameter values of the projection to create. */ public Mercator(final OperationMethod method, final Parameters parameters) { this(initializer(method, parameters)); @@ -310,8 +310,8 @@ public class Mercator extends ConformalP *

    The non-linear part of the returned transform will be {@code this} transform, except if the ellipsoid * is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.

    * - * @param factory The factory to use for creating the transform. - * @return The map projection from (λ,φ) to (x,y) coordinates. + * @param factory the factory to use for creating the transform. + * @return the map projection from (λ,φ) to (x,y) coordinates. * @throws FactoryException if an error occurred while creating a transform. */ @Override @@ -328,7 +328,7 @@ public class Mercator extends ConformalP * (linear distance on a unit sphere). In addition, opportunistically computes the projection derivative * if {@code derivate} is {@code true}. * - * @return The matrix of the projection derivative at the given source position, + * @return the matrix of the projection derivative at the given source position, * or {@code null} if the {@code derivate} argument is {@code false}. * @throws ProjectionException if the coordinate can not be converted. */ @@ -349,8 +349,10 @@ public class Mercator extends ConformalP if (φ == 0) { y = φ; } else { - // See the javadoc of the Spherical inner class for a note - // about why we perform explicit checks for the pole cases. + /* + * See the javadoc of the Spherical inner class for a note + * about why we perform explicit checks for the pole cases. + */ final double a = abs(φ); if (a < PI/2) { y = log(expOfNorthing(φ, eccentricity * sinφ)); // Snyder (7-7) @@ -391,8 +393,10 @@ public class Mercator extends ConformalP while (--numPts >= 0) { final double φ = dstPts[dstOff += 2]; // Same as srcPts[srcOff + 1]. if (φ != 0) { - // See the javadoc of the Spherical inner class for a note - // about why we perform explicit checks for the pole cases. + /* + * See the javadoc of the Spherical inner class for a note + * about why we perform explicit checks for the pole cases. + */ final double a = abs(φ); final double y; if (a < PI/2) { @@ -459,7 +463,7 @@ public class Mercator extends ConformalP /** * Constructs a new map projection from the parameters of the given projection. * - * @param other The other projection (usually ellipsoidal) from which to copy the parameters. + * @param other the other projection (usually ellipsoidal) from which to copy the parameters. */ Spherical(final Mercator other) { super(other); Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -18,6 +18,7 @@ package org.apache.sis.referencing.opera import java.util.Map; import java.util.HashMap; +import java.util.Objects; import java.io.Serializable; import java.lang.reflect.Modifier; import org.opengis.metadata.Identifier; @@ -54,9 +55,6 @@ import org.apache.sis.util.resources.Err import static java.lang.Math.*; -// Branch-dependent imports -import java.util.Objects; - /** * Base class for conversion services between ellipsoidal and cartographic projections. @@ -401,10 +399,10 @@ public abstract class NormalizedProjecti * this constructor. But those values will be converted to the units of measurement specified by the parameter * descriptors in the {@code roles} map, which must be the above-cited units. * - * @param method Description of the map projection parameters. - * @param parameters The parameters of the projection to be created. - * @param roles Parameters to look for central meridian, scale factor, - * false easting, false northing and other values. + * @param method description of the map projection parameters. + * @param parameters the parameters of the projection to be created. + * @param roles parameters to look for central meridian, scale factor, + * false easting, false northing and other values. */ protected NormalizedProjection(final OperationMethod method, final Parameters parameters, final Map> roles) @@ -415,12 +413,12 @@ public abstract class NormalizedProjecti /** * Creates a new normalized projection from the parameters computed by the given initializer. * - * @param initializer The initializer for computing map projection internal parameters. + * @param initializer the initializer for computing map projection internal parameters. */ NormalizedProjection(final Initializer initializer) { context = initializer.context; eccentricitySquared = initializer.eccentricitySquared.value; - eccentricity = sqrt(eccentricitySquared); // DoubleDouble.sqrt() does not make any difference here. + eccentricity = sqrt(eccentricitySquared); // DoubleDouble.sqrt() does not make any difference here. inverse = new Inverse(); } @@ -447,9 +445,9 @@ public abstract class NormalizedProjecti * fallback if the descriptor does not contain EPSG identifier, which should be rare. Usually, the regular * expression will never be compiled. * - * @param parameters The user-specified parameters. - * @param regex The regular expression to use when using the operation name as the criterion. - * @param identifier The identifier to compare against the operation method name. + * @param parameters the user-specified parameters. + * @param regex the regular expression to use when using the operation name as the criterion. + * @param identifier the identifier to compare against the operation method name. * @return {@code true} if the name of the given operation method contains the given keyword * or has an EPSG identifier equals to the given identifier. */ @@ -480,8 +478,8 @@ public abstract class NormalizedProjecti * For example many subclasses will replace {@code this} by a specialized implementation if they detect that the * ellipsoid is actually spherical. * - * @param factory The factory to use for creating the transform. - * @return The map projection from (λ,φ) to (x,y) coordinates. + * @param factory the factory to use for creating the transform. + * @return the map projection from (λ,φ) to (x,y) coordinates. * @throws FactoryException if an error occurred while creating a transform. * * @see ContextualParameters#completeTransform(MathTransformFactory, MathTransform) @@ -504,9 +502,9 @@ public abstract class NormalizedProjecti * It is caller's responsibility to choose an alternative method that can understand the parameters which were * given to this original projection. * - * @param factory The factory given to {@link #createMapProjection(MathTransformFactory)}. - * @param name The name of the alternative map projection to use. - * @return The alternative projection. + * @param factory the factory given to {@link #createMapProjection(MathTransformFactory)}. + * @param name the name of the alternative map projection to use. + * @return the alternative projection. * @throws FactoryException if an error occurred while creating the alternative projection. * * @since 0.7 @@ -535,7 +533,7 @@ public abstract class NormalizedProjecti * Subclasses shall not use the values defined in the returned object for computation purpose, * except at construction time. * - * @return The parameters values for the sequence of normalize → {@code this} → denormalize + * @return the parameters values for the sequence of normalize → {@code this} → denormalize * transforms, or {@code null} if unspecified. */ @Override @@ -556,7 +554,7 @@ public abstract class NormalizedProjecti * Most GIS applications will instead be interested in the {@linkplain #getContextualParameters() * contextual parameters}. * - * @return A copy of the internal parameter values for this normalized projection. + * @return a copy of the internal parameter values for this normalized projection. */ @Debug @Override @@ -580,7 +578,7 @@ public abstract class NormalizedProjecti * not for inspecting the {@linkplain #getContextualParameters() contextual parameters}. * Inspecting the kernel parameter values is usually for debugging purpose only.

    * - * @return A description of the internal parameters. + * @return a description of the internal parameters. */ @Debug @Override @@ -653,14 +651,14 @@ public abstract class NormalizedProjecti * If this assumption is not applicable to a particular subclass, then it is implementor's responsibility to check * the range. * - * @param srcPts The array containing the source point coordinate, as (longitude, latitude) - * angles in radians. - * @param srcOff The offset of the single coordinate to be converted in the source array. - * @param dstPts The array into which the converted coordinate is returned (may be the same than {@code srcPts}). - * Ordinates will be expressed in a dimensionless unit, as a linear distance on a unit sphere or ellipse. - * @param dstOff The offset of the location of the converted coordinate that is stored in the destination array. - * @param derivate {@code true} for computing the derivative, or {@code false} if not needed. - * @return The matrix of the projection derivative at the given source position, + * @param srcPts the array containing the source point coordinate, as (longitude, latitude) + * angles in radians. + * @param srcOff the offset of the single coordinate to be converted in the source array. + * @param dstPts the array into which the converted coordinate is returned (may be the same than {@code srcPts}). + * Ordinates will be expressed in a dimensionless unit, as a linear distance on a unit sphere or ellipse. + * @param dstOff the offset of the location of the converted coordinate that is stored in the destination array. + * @param derivate {@code true} for computing the derivative, or {@code false} if not needed. + * @return the matrix of the projection derivative at the given source position, * or {@code null} if the {@code derivate} argument is {@code false}. * @throws ProjectionException if the coordinate can not be converted. */ @@ -683,11 +681,11 @@ public abstract class NormalizedProjecti *
    Note: in Proj.4, the same standardization, * described above, is handled by {@code pj_inv.c}.
    * - * @param srcPts The array containing the source point coordinate, as linear distance on a unit sphere or ellipse. - * @param srcOff The offset of the point to be converted in the source array. - * @param dstPts The array into which the converted point coordinate is returned (may be the same than {@code srcPts}). - * Ordinates will be (longitude, latitude) angles in radians. - * @param dstOff The offset of the location of the converted point that is stored in the destination array. + * @param srcPts the array containing the source point coordinate, as linear distance on a unit sphere or ellipse. + * @param srcOff the offset of the point to be converted in the source array. + * @param dstPts the array into which the converted point coordinate is returned (may be the same than {@code srcPts}). + * Ordinates will be (longitude, latitude) angles in radians. + * @param dstOff the offset of the location of the converted point that is stored in the destination array. * @throws ProjectionException if the point can not be converted. */ protected abstract void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff) @@ -698,7 +696,7 @@ public abstract class NormalizedProjecti * Subclasses do not need to override this method, as they should override * {@link #inverseTransform(double[], int, double[], int) inverseTransform(…)} instead. * - * @return The inverse of this map projection. + * @return the inverse of this map projection. */ @Override public MathTransform2D inverse() { @@ -753,7 +751,7 @@ public abstract class NormalizedProjecti /** * Computes a hash code value for this {@code NormalizedProjection}. * - * @return The hash code value. + * @return the hash code value. */ @Override protected int computeHashCode() { @@ -784,8 +782,8 @@ public abstract class NormalizedProjecti * equivalent allows the referencing module to transform coordinates between those two projections more efficiently. * * - * @param object The object to compare with this map projection for equivalence. - * @param mode The strictness level of the comparison. Default to {@link ComparisonMode#STRICT}. + * @param object the object to compare with this map projection for equivalence. + * @param mode the strictness level of the comparison. Default to {@link ComparisonMode#STRICT}. * @return {@code true} if the given object is equivalent to this map projection. */ @Override Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -418,10 +418,10 @@ public class ObliqueStereographic extend final double sinφsinφ0 = sinφ * sinχ0; final double cosφcosφ0 = cosφ * cosχ0; final double cosφsinλ = cosφ * sinλ; - final double B = 1 + sinφsinφ0 + cosφcosφ0*cosλ; // Synder 21-4 + final double B = 1 + sinφsinφ0 + cosφcosφ0*cosλ; // Synder 21-4 if (dstPts != null) { - dstPts[dstOff ] = cosφsinλ / B; // Synder 21-2 - dstPts[dstOff+1] = (sinφ*cosχ0 - cosφ*sinχ0*cosλ) / B; // Synder 21-3 + dstPts[dstOff ] = cosφsinλ / B; // Synder 21-2 + dstPts[dstOff+1] = (sinφ*cosχ0 - cosφ*sinχ0*cosλ) / B; // Synder 21-3 } if (!derivate) { return null; Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java?rev=1779702&r1=1779701&r2=1779702&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java [UTF-8] Sat Jan 21 08:49:49 2017 @@ -102,8 +102,8 @@ public class PolarStereographic extends *
  • "Polar Stereographic (Variant C)".
  • * * - * @param method Description of the projection parameters. - * @param parameters The parameter values of the projection to create. + * @param method description of the projection parameters. + * @param parameters the parameter values of the projection to create. */ public PolarStereographic(final OperationMethod method, final Parameters parameters) { this(initializer(method, parameters)); @@ -261,8 +261,8 @@ public class PolarStereographic extends *

    The non-linear part of the returned transform will be {@code this} transform, except if the ellipsoid * is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.

    * - * @param factory The factory to use for creating the transform. - * @return The map projection from (λ,φ) to (x,y) coordinates. + * @param factory the factory to use for creating the transform. + * @return the map projection from (λ,φ) to (x,y) coordinates. * @throws FactoryException if an error occurred while creating a transform. */ @Override @@ -278,7 +278,7 @@ public class PolarStereographic extends * Converts the specified (θ,φ) coordinate (units in radians) and stores the result in {@code dstPts}. * In addition, opportunistically computes the projection derivative if {@code derivate} is {@code true}. * - * @return The matrix of the projection derivative at the given source position, + * @return the matrix of the projection derivative at the given source position, * or {@code null} if the {@code derivate} argument is {@code false}. * @throws ProjectionException if the coordinate can not be converted. */ @@ -333,7 +333,7 @@ public class PolarStereographic extends { final double x = srcPts[srcOff ]; final double y = srcPts[srcOff+1]; - dstPts[dstOff ] = atan2(x, y); // Really (x,y), not (y,x) + dstPts[dstOff ] = atan2(x, y); // Really (x,y), not (y,x) dstPts[dstOff+1] = -φ(hypot(x, y)); } @@ -358,7 +358,7 @@ public class PolarStereographic extends /** * Constructs a new map projection from the parameters of the given projection. * - * @param other The other projection (usually ellipsoidal) from which to copy the parameters. + * @param other the other projection (usually ellipsoidal) from which to copy the parameters. */ protected Spherical(final PolarStereographic other) { super(other); @@ -372,13 +372,13 @@ public class PolarStereographic extends final double[] dstPts, final int dstOff, final boolean derivate) throws ProjectionException { - final double θ = srcPts[srcOff ]; // θ = λ - λ₀ + final double θ = srcPts[srcOff ]; // θ = λ - λ₀ final double φ = srcPts[srcOff+1]; final double sinθ = sin(θ); final double cosθ = cos(θ); final double t = tan(PI/4 + 0.5*φ); - final double x = t * sinθ; // Synder 21-5 - final double y = t * cosθ; // Synder 21-6 + final double x = t * sinθ; // Synder 21-5 + final double y = t * cosθ; // Synder 21-6 if (dstPts != null) { dstPts[dstOff ] = x; dstPts[dstOff+1] = y; @@ -387,8 +387,8 @@ public class PolarStereographic extends return null; } final double dt = t / cos(φ); - return new Matrix2(y, dt*sinθ, // ∂x/∂λ , ∂x/∂φ - -x, dt*cosθ); // ∂y/∂λ , ∂y/∂φ + return new Matrix2(y, dt*sinθ, // ∂x/∂λ , ∂x/∂φ + -x, dt*cosθ); // ∂y/∂λ , ∂y/∂φ } /**