Changeset 11587 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2017-02-19T23:52:08+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java
r9246 r11587 7 7 8 8 import org.openstreetmap.josm.data.coor.EastNorth; 9 import org.openstreetmap.josm.data.osm.Node; 9 10 import org.openstreetmap.josm.data.osm.RelationMember; 10 11 import org.openstreetmap.josm.data.osm.Way; … … 28 29 29 30 static Direction roundaboutType(Way w) { 30 if (w != null && 31 "roundabout".equals(w.get("junction")) && 32 w.getNodesCount() < 200 && 33 w.getNodesCount() > 2 && 34 w.getNode(0) != null && 35 w.getNode(1) != null && 36 w.getNode(2) != null && 37 w.isClosed()) { 38 /** do some simple determinant / cross pruduct test on the first 3 nodes 39 to see, if the roundabout goes clock wise or ccw */ 40 EastNorth en1 = w.getNode(0).getEastNorth(); 41 EastNorth en2 = w.getNode(1).getEastNorth(); 42 EastNorth en3 = w.getNode(2).getEastNorth(); 43 if (en1 != null && en2 != null && en3 != null) { 44 en1 = en2.subtract(en1); 45 en2 = en3.subtract(en2); 46 return en1.north() * en2.east() - en2.north() * en1.east() > 0 ? ROUNDABOUT_LEFT : ROUNDABOUT_RIGHT; 31 if (w != null && "roundabout".equals(w.get("junction"))) { 32 int nodesCount = w.getNodesCount(); 33 if (nodesCount > 2 && nodesCount < 200) { 34 Node n1 = w.getNode(0); 35 Node n2 = w.getNode(1); 36 Node n3 = w.getNode(2); 37 if (n1 != null && n2 != null && n3 != null && w.isClosed()) { 38 /** do some simple determinant / cross pruduct test on the first 3 nodes 39 to see, if the roundabout goes clock wise or ccw */ 40 EastNorth en1 = n1.getEastNorth(); 41 EastNorth en2 = n2.getEastNorth(); 42 EastNorth en3 = n3.getEastNorth(); 43 if (en1 != null && en2 != null && en3 != null) { 44 en1 = en2.subtract(en1); 45 en2 = en3.subtract(en2); 46 return en1.north() * en2.east() - en2.north() * en1.east() > 0 ? ROUNDABOUT_LEFT : ROUNDABOUT_RIGHT; 47 } 48 } 47 49 } 48 50 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r11566 r11587 1352 1352 */ 1353 1353 private void checkCache() { 1354 // CHECKSTYLE.OFF: BooleanExpressionComplexity 1354 1355 if ((computeCacheMaxLineLengthUsed != maxLineLength) 1355 1356 || (computeCacheColored != colored) … … 1361 1362 || (computeCacheHeatMapDrawGain != heatMapDrawGain)) 1362 1363 || (computeCacheHeatMapDrawLowerLimit != heatMapDrawLowerLimit) 1363 ) { 1364 ) { 1365 // CHECKSTYLE.ON: BooleanExpressionComplexity 1364 1366 computeCacheMaxLineLengthUsed = maxLineLength; 1365 1367 computeCacheInSync = false;
Note:
See TracChangeset
for help on using the changeset viewer.