Changeset 8406 in josm for trunk/src/org/openstreetmap/josm/data/projection/datum
- Timestamp:
- 2015-05-21T02:19:24+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java
r8379 r8406 223 223 * <p>This method is thread safe for both memory based and file based node data. 224 224 * @param gs GridShift object containing the coordinate to shift and the shift values 225 * @return the GridShift object supplied, with values updated. 226 */ 227 public NTV2GridShift interpolateGridShift(NTV2GridShift gs) { 225 */ 226 public void interpolateGridShift(NTV2GridShift gs) { 228 227 int lonIndex = (int)((gs.getLonPositiveWestSeconds() - minLon) / lonInterval); 229 228 int latIndex = (int)((gs.getLatSeconds() - minLat) / latInterval); 230 229 231 double X= (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;232 double Y= (gs.getLatSeconds() - (minLat + (latInterval * latIndex))) / latInterval;230 double x = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval; 231 double y = (gs.getLatSeconds() - (minLat + (latInterval * latIndex))) / latInterval; 233 232 234 233 // Find the nodes at the four corners of the cell … … 240 239 241 240 gs.setLonShiftPositiveWestSeconds(interpolate( 242 lonShift[indexA], lonShift[indexB], lonShift[indexC], lonShift[indexD], X, Y));241 lonShift[indexA], lonShift[indexB], lonShift[indexC], lonShift[indexD], x, y)); 243 242 244 243 gs.setLatShiftSeconds(interpolate( 245 latShift[indexA], latShift[indexB], latShift[indexC], latShift[indexD], X, Y));244 latShift[indexA], latShift[indexB], latShift[indexC], latShift[indexD], x, y)); 246 245 247 246 if (lonAccuracy == null) { … … 250 249 gs.setLonAccuracyAvailable(true); 251 250 gs.setLonAccuracySeconds(interpolate( 252 lonAccuracy[indexA], lonAccuracy[indexB], lonAccuracy[indexC], lonAccuracy[indexD], X, Y));251 lonAccuracy[indexA], lonAccuracy[indexB], lonAccuracy[indexC], lonAccuracy[indexD], x, y)); 253 252 } 254 253 … … 258 257 gs.setLatAccuracyAvailable(true); 259 258 gs.setLatAccuracySeconds(interpolate( 260 latAccuracy[indexA], latAccuracy[indexB], latAccuracy[indexC], latAccuracy[indexD], X, Y)); 261 } 262 return gs; 259 latAccuracy[indexA], latAccuracy[indexB], latAccuracy[indexC], latAccuracy[indexD], x, y)); 260 } 263 261 } 264 262
Note:
See TracChangeset
for help on using the changeset viewer.