Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (4 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

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

Legend:

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

    r8509 r8510  
    352352            return new CentricDatum(null, null, ellps);
    353353        boolean is3Param = true;
    354         for (int i = 3; i<towgs84Param.size(); i++) {
     354        for (int i = 3; i < towgs84Param.size(); i++) {
    355355            if (towgs84Param.get(i) != 0) {
    356356                is3Param = false;
  • trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java

    r8451 r8510  
    2929     */
    3030    public static final Ellipsoid AustSA = Ellipsoid.create_a_rf(6378160.0, 298.25);
    31    
     31
    3232    /**
    3333     * Bessel 1841 ellipsoid
    3434     */
    3535    public static final Ellipsoid Bessel1841 = Ellipsoid.create_a_rf(6377397.155, 299.1528128);
    36    
     36
    3737    /**
    3838     * Clarke 1866 ellipsoid
     
    251251        double v1 = 1-e*Math.sin(phi);
    252252        double v2 = 1+e*Math.sin(phi);
    253         return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2,e/2));
     253        return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2, e/2));
    254254    }
    255255
     
    262262        double v1 = 1-e*Math.sin(phi);
    263263        double v2 = 1+e*Math.sin(phi);
    264         return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2,e/2));
     264        return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2, e/2));
    265265    }
    266266
     
    275275        double lati = lat0;
    276276        double lati1 = 1.0; // random value to start the iterative processus
    277         while(Math.abs(lati1-lati)>=epsilon) {
     277        while (Math.abs(lati1-lati) >= epsilon) {
    278278            lati = lati1;
    279279            double v1 = 1+e*Math.sin(lati);
    280280            double v2 = 1-e*Math.sin(lati);
    281             lati1 = 2*Math.atan(Math.pow(v1/v2,e/2)*Math.exp(latIso))-Math.PI/2;
     281            lati1 = 2*Math.atan(Math.pow(v1/v2, e/2)*Math.exp(latIso))-Math.PI/2;
    282282        }
    283283        return lati1;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r8470 r8510  
    312312        NTV2SubGrid[] clone = new NTV2SubGrid[topLevelSubGrid.length];
    313313        for (int i = 0; i < topLevelSubGrid.length; i++) {
    314             clone[i] = (NTV2SubGrid)topLevelSubGrid[i].clone();
     314            clone[i] = (NTV2SubGrid) topLevelSubGrid[i].clone();
    315315        }
    316316        return clone;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r8470 r8510  
    105105        readBytes(in, b8);
    106106        lonInterval = NTV2Util.getDouble(b8, bigEndian);
    107         lonColumnCount = 1 + (int)((maxLon - minLon) / lonInterval);
    108         latRowCount = 1 + (int)((maxLat - minLat) / latInterval);
     107        lonColumnCount = 1 + (int) ((maxLon - minLon) / lonInterval);
     108        latRowCount = 1 + (int) ((maxLat - minLat) / latInterval);
    109109        readBytes(in, b8);
    110110        readBytes(in, b8);
     
    121121        for (int i = 0; i < nodeCount; i++) {
    122122            // Read the grid file byte after byte. This is a workaround about a bug in
    123             // certain VM which are not able to read byte blocks when the resource file is
    124             // in a .jar file (Pieren)
     123            // certain VM which are not able to read byte blocks when the resource file is in a .jar file (Pieren)
    125124            readBytes(in, b1); b4[0] = b1[0];
    126125            readBytes(in, b1); b4[1] = b1[0];
     
    211210     */
    212211    private final double interpolate(float a, float b, float c, float d, double x, double y) {
    213         return a + (((double)b - (double)a) * x) + (((double)c - (double)a) * y) +
    214         (((double)a + (double)d - b - c) * x * y);
     212        return a + (((double) b - (double) a) * x) + (((double) c - (double) a) * y) +
     213        (((double) a + (double) d - b - c) * x * y);
    215214    }
    216215
     
    225224     */
    226225    public void interpolateGridShift(NTV2GridShift gs) {
    227         int lonIndex = (int)((gs.getLonPositiveWestSeconds() - minLon) / lonInterval);
    228         int latIndex = (int)((gs.getLatSeconds() - minLat) / latInterval);
     226        int lonIndex = (int) ((gs.getLonPositiveWestSeconds() - minLon) / lonInterval);
     227        int latIndex = (int) ((gs.getLatSeconds() - minLat) / latInterval);
    229228
    230229        double x = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;
     
    331330        NTV2SubGrid clone = null;
    332331        try {
    333             clone = (NTV2SubGrid)super.clone();
     332            clone = (NTV2SubGrid) super.clone();
    334333            // Do a deep clone of the sub grids
    335334            if (subGrid != null) {
    336335                clone.subGrid = new NTV2SubGrid[subGrid.length];
    337336                for (int i = 0; i < subGrid.length; i++) {
    338                     clone.subGrid[i] = (NTV2SubGrid)subGrid[i].clone();
     337                    clone.subGrid[i] = (NTV2SubGrid) subGrid[i].clone();
    339338                }
    340339            }
     
    344343        return clone;
    345344    }
     345
    346346    /**
    347347     * Get maximum latitude value
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

    r8374 r8510  
    100100            j = getIntLE(b, 0);
    101101        }
    102         long l = ((long)i << 32) |
     102        long l = ((long) i << 32) |
    103103        (j & 0x00000000FFFFFFFFL);
    104104        return Double.longBitsToDouble(l);
  • trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java

    r8444 r8510  
    3131    public abstract static class Parameters {
    3232        public final double latitudeOrigin;
     33
    3334        public Parameters(double latitudeOrigin) {
    3435            this.latitudeOrigin = latitudeOrigin;
     
    4546        public final double standardParallel1;
    4647        public final double standardParallel2;
     48
    4749        public Parameters2SP(double latitudeOrigin, double standardParallel1, double standardParallel2) {
    4850            super(latitudeOrigin);
     
    163165    @Override
    164166    public double[] invproject(double east, double north) {
    165         double r = sqrt(pow(east,2) + pow(north-r0, 2));
     167        double r = sqrt(pow(east, 2) + pow(north-r0, 2));
    166168        double gamma = atan(east / (r0-north));
    167169        double lambda = gamma/n;
Note: See TracChangeset for help on using the changeset viewer.