# Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/data/projection

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

checkstyle: enable relevant whitespace checks and fix them

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

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

 r8509 return new CentricDatum(null, null, ellps); boolean is3Param = true; for (int i = 3; i
• ## trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java

 r8451 */ public static final Ellipsoid AustSA = Ellipsoid.create_a_rf(6378160.0, 298.25); /** * Bessel 1841 ellipsoid */ public static final Ellipsoid Bessel1841 = Ellipsoid.create_a_rf(6377397.155, 299.1528128); /** * Clarke 1866 ellipsoid double v1 = 1-e*Math.sin(phi); double v2 = 1+e*Math.sin(phi); return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2,e/2)); return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2, e/2)); } double v1 = 1-e*Math.sin(phi); double v2 = 1+e*Math.sin(phi); return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2,e/2)); return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2, e/2)); } double lati = lat0; double lati1 = 1.0; // random value to start the iterative processus while(Math.abs(lati1-lati)>=epsilon) { while (Math.abs(lati1-lati) >= epsilon) { lati = lati1; double v1 = 1+e*Math.sin(lati); double v2 = 1-e*Math.sin(lati); lati1 = 2*Math.atan(Math.pow(v1/v2,e/2)*Math.exp(latIso))-Math.PI/2; lati1 = 2*Math.atan(Math.pow(v1/v2, e/2)*Math.exp(latIso))-Math.PI/2; } return lati1;
• ## trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

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

 r8470 readBytes(in, b8); lonInterval = NTV2Util.getDouble(b8, bigEndian); lonColumnCount = 1 + (int)((maxLon - minLon) / lonInterval); latRowCount = 1 + (int)((maxLat - minLat) / latInterval); lonColumnCount = 1 + (int) ((maxLon - minLon) / lonInterval); latRowCount = 1 + (int) ((maxLat - minLat) / latInterval); readBytes(in, b8); readBytes(in, b8); for (int i = 0; i < nodeCount; i++) { // Read the grid file byte after byte. This is a workaround about a bug in // certain VM which are not able to read byte blocks when the resource file is // in a .jar file (Pieren) // certain VM which are not able to read byte blocks when the resource file is in a .jar file (Pieren) readBytes(in, b1); b4[0] = b1[0]; readBytes(in, b1); b4[1] = b1[0]; */ private final double interpolate(float a, float b, float c, float d, double x, double y) { return a + (((double)b - (double)a) * x) + (((double)c - (double)a) * y) + (((double)a + (double)d - b - c) * x * y); return a + (((double) b - (double) a) * x) + (((double) c - (double) a) * y) + (((double) a + (double) d - b - c) * x * y); } */ public void interpolateGridShift(NTV2GridShift gs) { int lonIndex = (int)((gs.getLonPositiveWestSeconds() - minLon) / lonInterval); int latIndex = (int)((gs.getLatSeconds() - minLat) / latInterval); int lonIndex = (int) ((gs.getLonPositiveWestSeconds() - minLon) / lonInterval); int latIndex = (int) ((gs.getLatSeconds() - minLat) / latInterval); double x = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval; NTV2SubGrid clone = null; try { clone = (NTV2SubGrid)super.clone(); clone = (NTV2SubGrid) super.clone(); // Do a deep clone of the sub grids if (subGrid != null) { clone.subGrid = new NTV2SubGrid[subGrid.length]; for (int i = 0; i < subGrid.length; i++) { clone.subGrid[i] = (NTV2SubGrid)subGrid[i].clone(); clone.subGrid[i] = (NTV2SubGrid) subGrid[i].clone(); } } return clone; } /** * Get maximum latitude value
• ## trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java

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

 r8444 public abstract static class Parameters { public final double latitudeOrigin; public Parameters(double latitudeOrigin) { this.latitudeOrigin = latitudeOrigin; public final double standardParallel1; public final double standardParallel2; public Parameters2SP(double latitudeOrigin, double standardParallel1, double standardParallel2) { super(latitudeOrigin); @Override public double[] invproject(double east, double north) { double r = sqrt(pow(east,2) + pow(north-r0, 2)); double r = sqrt(pow(east, 2) + pow(north-r0, 2)); double gamma = atan(east / (r0-north)); double lambda = gamma/n;
Note: See TracChangeset for help on using the changeset viewer.