Ignore:
Timestamp:
2017-09-08T01:04:05+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - deprecate Projections#project and Projections#inverseProject

replacement is a bit more verbose, but the fact that Main.proj is
involved need not be hidden

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r12726 r12778  
    1919import java.util.TreeSet;
    2020
     21import org.openstreetmap.josm.Main;
    2122import org.openstreetmap.josm.command.ChangeCommand;
    2223import org.openstreetmap.josm.command.Command;
     
    2930import org.openstreetmap.josm.data.osm.Way;
    3031import org.openstreetmap.josm.data.osm.WaySegment;
    31 import org.openstreetmap.josm.data.projection.Projections;
    3232import org.openstreetmap.josm.gui.MainApplication;
    3333import org.openstreetmap.josm.gui.MapView;
     
    138138                if (joinWayToNode) {
    139139                    for (Node node : nodesInSegment) {
    140                         EastNorth newPosition = Geometry.closestPointToSegment(w.getNode(segmentIndex).getEastNorth(),
    141                                                                             w.getNode(segmentIndex+1).getEastNorth(),
    142                                                                             node.getEastNorth());
    143                         MoveCommand c = new MoveCommand(node, Projections.inverseProject(newPosition));
     140                        EastNorth newPosition = Geometry.closestPointToSegment(
     141                                w.getNode(segmentIndex).getEastNorth(),
     142                                w.getNode(segmentIndex+1).getEastNorth(),
     143                                node.getEastNorth());
     144                        MoveCommand c = new MoveCommand(
     145                                node, Main.getProjection().eastNorth2latlon(newPosition));
    144146                        // Avoid moving a given node several times at the same position in case of overlapping ways
    145147                        if (!cmds.contains(c)) {
Note: See TracChangeset for help on using the changeset viewer.