Changeset 35978 in osm for applications/editors/josm/plugins/buildings_tools
- Timestamp:
- 2022-06-15T20:10:48+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/AngleSnap.java
r34850 r35978 25 25 public final Double addSnap(Node[] nodes) { 26 26 if (nodes.length == 2) { 27 EastNorth p1 = latlon2eastNorth(nodes[0] .getCoor());28 EastNorth p2 = latlon2eastNorth(nodes[1] .getCoor());27 EastNorth p1 = latlon2eastNorth(nodes[0]); 28 EastNorth p2 = latlon2eastNorth(nodes[1]); 29 29 double heading = p1.heading(p2); 30 30 addSnap(heading); … … 38 38 public final void addSnap(Way way) { 39 39 for (Pair<Node, Node> pair : way.getNodePairs(false)) { 40 EastNorth a = latlon2eastNorth(pair.a .getCoor());41 EastNorth b = latlon2eastNorth(pair.b .getCoor());40 EastNorth a = latlon2eastNorth(pair.a); 41 EastNorth b = latlon2eastNorth(pair.b); 42 42 double heading = a.heading(b); 43 43 addSnap(heading); -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/BuildingsToolsPlugin.java
r34572 r35978 5 5 6 6 import org.openstreetmap.josm.data.coor.EastNorth; 7 import org.openstreetmap.josm.data.coor.ILatLon; 7 8 import org.openstreetmap.josm.data.coor.LatLon; 8 9 import org.openstreetmap.josm.data.projection.Projection; … … 18 19 public static final Projection MERCATOR = Projections.getProjectionByCode("EPSG:3857"); // Mercator 19 20 20 public static EastNorth latlon2eastNorth( LatLon p) {21 public static EastNorth latlon2eastNorth(ILatLon p) { 21 22 return MERCATOR.latlon2eastNorth(p); 22 23 } -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java
r35929 r35978 210 210 Node n = MainApplication.getMap().mapView.getNearestNode(mousePos, OsmPrimitive::isUsable); 211 211 if (n != null) 212 return latlon2eastNorth(n .getCoor());212 return latlon2eastNorth(n); 213 213 IWaySegment<Node, Way> ws = MainApplication.getMap().mapView.getNearestWaySegment(mousePos, 214 214 OsmPrimitive::isSelectable); 215 215 if (ws != null && ws.getWay().get("building") != null) { 216 EastNorth p1 = latlon2eastNorth(ws.getFirstNode() .getCoor());217 EastNorth p2 = latlon2eastNorth(ws.getSecondNode() .getCoor());216 EastNorth p1 = latlon2eastNorth(ws.getFirstNode()); 217 EastNorth p2 = latlon2eastNorth(ws.getSecondNode()); 218 218 EastNorth enX = Geometry.closestPointToSegment(p1, p2, 219 219 latlon2eastNorth(MainApplication.getMap().mapView.getLatLon(mousePos.x, mousePos.y))); -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/ToolSettings.java
r35915 r35978 98 98 } else { 99 99 ToolSettings.shape = Shape.RECTANGLE; 100 return (Shape.RECTANGLE);100 return Shape.RECTANGLE; 101 101 } 102 102 }
Note:
See TracChangeset
for help on using the changeset viewer.