Ignore:
Timestamp:
2015-12-13T22:48:40+01:00 (8 years ago)
Author:
Don-vip
Message:

checkstyle

Location:
trunk/src/org/openstreetmap/josm/data/projection/proj
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java

    r9116 r9117  
    2525
    2626    /**
    27      * Relative iteration precision used in the <code>mlfn<code> method
     27     * Relative iteration precision used in the <code>mlfn</code> method
    2828     */
    2929    private static final double MLFN_TOL = 1E-11;
     
    3333     * {@link #en2}, {@link #en3}, {@link #en4}.
    3434     */
    35     private static final double C00= 1.0,
    36                                 C02= 0.25,
    37                                 C04= 0.046875,
    38                                 C06= 0.01953125,
    39                                 C08= 0.01068115234375,
    40                                 C22= 0.75,
    41                                 C44= 0.46875,
    42                                 C46= 0.01302083333333333333,
    43                                 C48= 0.00712076822916666666,
    44                                 C66= 0.36458333333333333333,
    45                                 C68= 0.00569661458333333333,
    46                                 C88= 0.3076171875;
     35    private static final double C00 = 1.0,
     36                                C02 = 0.25,
     37                                C04 = 0.046875,
     38                                C06 = 0.01953125,
     39                                C08 = 0.01068115234375,
     40                                C22 = 0.75,
     41                                C44 = 0.46875,
     42                                C46 = 0.01302083333333333333,
     43                                C48 = 0.00712076822916666666,
     44                                C66 = 0.36458333333333333333,
     45                                C68 = 0.00569661458333333333,
     46                                C88 = 0.3076171875;
    4747
    4848    /**
    49      * Constant needed for the <code>mlfn<code> method.
     49     * Constant needed for the <code>mlfn</code> method.
    5050     * Setup at construction time.
    5151     */
    52     protected double en0,en1,en2,en3,en4;
     52    protected double en0, en1, en2, en3, en4;
    5353
    5454    /**
    5555     * The square of excentricity: e² = (a²-b²)/a² where
    56      * <var>e</var> is the {@linkplain #excentricity excentricity},
    57      * <var>a</var> is the {@linkplain #semiMajor semi major} axis length and
    58      * <var>b</var> is the {@linkplain #semiMinor semi minor} axis length.
     56     * <var>e</var> is the excentricity,
     57     * <var>a</var> is the semi major axis length and
     58     * <var>b</var> is the semi minor axis length.
    5959     */
    6060    protected double e2;
     
    107107        int i;
    108108        phi = arg;
    109         for (i=MAXIMUM_ITERATIONS; true;) { // rarely goes over 5 iterations
     109        for (i = MAXIMUM_ITERATIONS; true;) { // rarely goes over 5 iterations
    110110            if (--i < 0) {
    111111                throw new RuntimeException("Too many iterations");
     
    122122
    123123    public static double normalizeLon(double lon) {
    124         if (lon >= - Math.PI && lon <= Math.PI)
     124        if (lon >= -Math.PI && lon <= Math.PI)
    125125            return lon;
    126126        else {
  • trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java

    r9116 r9117  
    5656 * </ul>
    5757 *
    58  * @see <A HREF="http://mathworld.wolfram.com/MercatorProjection.html">Transverse Mercator projection on MathWorld</A>
    59  * @see <A HREF="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html">"Transverse_Mercator" on RemoteSensing.org</A>
    60  *
    6158 * @author André Gosselin
    6259 * @author Martin Desruisseaux (PMO, IRD)
    6360 * @author Rueben Schulz
     61 *
     62 * @see <A HREF="http://mathworld.wolfram.com/MercatorProjection.html">Transverse Mercator projection on MathWorld</A>
     63 * @see <A HREF="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html">"Transverse_Mercator" on RemoteSensing.org</A>
    6464 */
    6565public class TransverseMercator extends AbstractProj {
     
    6969     * case of the Transverse Mercator.
    7070     */
    71     private static final double FC1= 1.00000000000000000000000,  // 1/1
    72                                 FC2= 0.50000000000000000000000,  // 1/2
    73                                 FC3= 0.16666666666666666666666,  // 1/6
    74                                 FC4= 0.08333333333333333333333,  // 1/12
    75                                 FC5= 0.05000000000000000000000,  // 1/20
    76                                 FC6= 0.03333333333333333333333,  // 1/30
    77                                 FC7= 0.02380952380952380952380,  // 1/42
    78                                 FC8= 0.01785714285714285714285;  // 1/56
     71    private static final double FC1 = 1.00000000000000000000000,  // 1/1
     72                                FC2 = 0.50000000000000000000000,  // 1/2
     73                                FC3 = 0.16666666666666666666666,  // 1/6
     74                                FC4 = 0.08333333333333333333333,  // 1/12
     75                                FC5 = 0.05000000000000000000000,  // 1/20
     76                                FC6 = 0.03333333333333333333333,  // 1/30
     77                                FC7 = 0.02380952380952380952380,  // 1/42
     78                                FC8 = 0.01785714285714285714285;  // 1/56
    7979
    8080    /**
     
    139139        y = (mlfn(y, sinphi, cosphi) - ml0 +
    140140            sinphi * al * x *
    141             FC2 * ( 1.0 +
     141            FC2 * (1.0 +
    142142            FC4 * als * (5.0 - t + n*(9.0 + 4.0*n) +
    143143            FC6 * als * (61.0 + t * (t - 58.0) + n*(270.0 - 330.0*t) +
    144             FC8 * als * (1385.0 + t * ( t*(543.0 - t) - 3111.0))))));
     144            FC8 * als * (1385.0 + t * (t*(543.0 - t) - 3111.0))))));
    145145
    146146        x = al*(FC1 + FC3 * als*(1.0 - t + n +
    147147            FC5 * als * (5.0 + t*(t - 18.0) + n*(14.0 - 58.0*t) +
    148             FC7 * als * (61.0+ t*(t*(179.0 - t) - 479.0 )))));
     148            FC7 * als * (61.0+ t*(t*(179.0 - t) - 479.0)))));
    149149
    150         return new double[] { x, y };
     150        return new double[] {x, y};
    151151    }
    152152
     
    156156
    157157        if (Math.abs(phi) >= Math.PI/2) {
    158             y = y<0.0 ? -(Math.PI/2) : (Math.PI/2);
     158            y = y < 0.0 ? -(Math.PI/2) : (Math.PI/2);
    159159            x = 0.0;
    160160        } else {
     
    179179                ds*FC7*(61.0 + t*(662.0 + t*(1320.0 + 720.0*t))))))/cosphi;
    180180        }
    181         return new double[] { y, x };
     181        return new double[] {y, x};
    182182    }
    183183}
Note: See TracChangeset for help on using the changeset viewer.