- Timestamp:
- 2015-05-21T02:19:24+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
r8385 r8406 201 201 return null; //could not make multipolygon. 202 202 } else { 203 return Pair.create(selectedMultipolygonRelation, createRelation(polygon, new Relation(selectedMultipolygonRelation)));203 return Pair.create(selectedMultipolygonRelation, createRelation(polygon, selectedMultipolygonRelation)); 204 204 } 205 205 } … … 214 214 return null; //could not make multipolygon. 215 215 } else { 216 return Pair.create(null, createRelation(polygon, n ew Relation()));216 return Pair.create(null, createRelation(polygon, null)); 217 217 } 218 218 } … … 302 302 * @return multipolygon relation 303 303 */ 304 private static Relation createRelation(MultipolygonBuilder pol, final Relation rel) {304 private static Relation createRelation(MultipolygonBuilder pol, Relation clone) { 305 305 // Create new relation 306 Relation rel = clone != null ? new Relation(clone) : new Relation(); 306 307 rel.put("type", "multipolygon"); 307 308 // Add ways to it -
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 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
r8285 r8406 67 67 if (wct.linkPrev) { 68 68 if (lastBackwardWay != UNCONNECTED && lastForwardWay != UNCONNECTED) { 69 wct =determineOnewayConnectionType(con, m, i, wct);69 determineOnewayConnectionType(con, m, i, wct); 70 70 if (!wct.linkPrev) { 71 71 firstGroupIdx = i; … … 139 139 private int lastBackwardWay; 140 140 private boolean onewayBeginning; 141 private WayConnectionType determineOnewayConnectionType(final List<WayConnectionType> con, 141 142 private void determineOnewayConnectionType(final List<WayConnectionType> con, 142 143 RelationMember m, int i, final WayConnectionType wct) { 143 144 Direction dirFW = determineDirection(lastForwardWay, con.get(lastForwardWay).direction, i); … … 201 202 } 202 203 } 203 return wct;204 204 } 205 205
Note:
See TracChangeset
for help on using the changeset viewer.