Ignore:
Timestamp:
2016-06-15T10:30:37+02:00 (8 years ago)
Author:
Don-vip
Message:

Checkstyle 6.19: enable SingleSpaceSeparator and fix violations

File:
1 edited

Legend:

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

    r9998 r10378  
    100100
    101101        final double sinphi;
    102         qp     = qsfn(1);
    103         rq     = Math.sqrt(0.5 * qp);
     102        qp = qsfn(1);
     103        rq = Math.sqrt(0.5 * qp);
    104104        sinphi = Math.sin(latitudeOfOrigin);
    105105        sinb1 = qsfn(sinphi) / qp;
     
    107107        switch (mode) {
    108108            case NORTH_POLE:  // Fall through
    109             case SOUTH_POLE: {
    110                 dd  = 1.0;
     109            case SOUTH_POLE:
     110                dd = 1.0;
    111111                xmf = ymf = rq;
    112112                break;
    113             }
    114             case EQUATORIAL: {
    115                 dd  = 1.0 / rq;
     113            case EQUATORIAL:
     114                dd = 1.0 / rq;
    116115                xmf = 1.0;
    117116                ymf = 0.5 * qp;
    118117                break;
    119             }
    120             case OBLIQUE: {
    121                 dd  = Math.cos(latitudeOfOrigin) /
    122                         (Math.sqrt(1.0 - e2 * sinphi * sinphi) * rq * cosb1);
     118            case OBLIQUE:
     119                dd = Math.cos(latitudeOfOrigin) / (Math.sqrt(1.0 - e2 * sinphi * sinphi) * rq * cosb1);
    123120                xmf = rq * dd;
    124121                ymf = rq / dd;
    125122                break;
    126             }
    127             default: {
     123            default:
    128124                throw new AssertionError(mode);
    129             }
    130125        }
    131126    }
     
    139134        final double sinb, cosb, b, c, x, y;
    140135        switch (mode) {
    141             case OBLIQUE: {
     136            case OBLIQUE:
    142137                sinb = q / qp;
    143138                cosb = Math.sqrt(1.0 - sinb * sinb);
    144                 c    = 1.0 + sinb1 * sinb + cosb1 * cosb * coslam;
    145                 b    = Math.sqrt(2.0 / c);
    146                 y    = ymf * b * (cosb1 * sinb - sinb1 * cosb * coslam);
    147                 x    = xmf * b * cosb * sinlam;
    148                 break;
    149             }
    150             case EQUATORIAL: {
     139                c = 1.0 + sinb1 * sinb + cosb1 * cosb * coslam;
     140                b = Math.sqrt(2.0 / c);
     141                y = ymf * b * (cosb1 * sinb - sinb1 * cosb * coslam);
     142                x = xmf * b * cosb * sinlam;
     143                break;
     144            case EQUATORIAL:
    151145                sinb = q / qp;
    152146                cosb = Math.sqrt(1.0 - sinb * sinb);
    153                 c    = 1.0 + cosb * coslam;
    154                 b    = Math.sqrt(2.0 / c);
    155                 y    = ymf * b * sinb;
    156                 x    = xmf * b * cosb * sinlam;
    157                 break;
    158             }
    159             case NORTH_POLE: {
     147                c = 1.0 + cosb * coslam;
     148                b = Math.sqrt(2.0 / c);
     149                y = ymf * b * sinb;
     150                x = xmf * b * cosb * sinlam;
     151                break;
     152            case NORTH_POLE:
    160153                c = (Math.PI / 2) + phi;
    161154                q = qp - q;
     
    168161                }
    169162                break;
    170             }
    171             case SOUTH_POLE: {
     163            case SOUTH_POLE:
    172164                c = phi - (Math.PI / 2);
    173165                q = qp + q;
     
    180172                }
    181173                break;
    182             }
    183             default: {
     174            default:
    184175                throw new AssertionError(mode);
    185             }
    186176        }
    187177        if (Math.abs(c) < EPSILON_LATITUDE) {
     
    211201                    if (mode == Mode.OBLIQUE) {
    212202                        ab = cCe * sinb1 + y * sCe * cosb1 / rho;
    213                         y  = rho * cosb1 * cCe - y * sinb1 * sCe;
     203                        y = rho * cosb1 * cCe - y * sinb1 * sCe;
    214204                    } else {
    215205                        ab = y * sCe / rho;
    216                         y  = rho * cCe;
     206                        y = rho * cCe;
    217207                    }
    218208                    lambda = Math.atan2(x, y);
Note: See TracChangeset for help on using the changeset viewer.