Ignore:
Timestamp:
2022-06-15T20:10:48+02:00 (3 years ago)
Author:
taylor.smock
Message:

See #22115: Extract methods from LatLon into ILatLon where they are generally applicable

This uses the extracted methods where possible, and removes unnecessary
Node#getCoor calls.

Location:
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java

    r35812 r35978  
    1818
    1919import org.openstreetmap.josm.data.coor.EastNorth;
    20 import org.openstreetmap.josm.data.coor.LatLon;
     20import org.openstreetmap.josm.data.coor.ILatLon;
    2121import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2222import org.openstreetmap.josm.plugins.turnlanes.model.Junction;
     
    5353        final Point2D origin = avgOrigin(locs(mc.getPrimaryJunctions()));
    5454
    55         final LatLon originCoor = ProjectionRegistry.getProjection().eastNorth2latlon(new EastNorth(origin.getX(), origin.getY()));
    56         final LatLon relCoor = ProjectionRegistry.getProjection().eastNorth2latlon(
     55        final ILatLon originCoor = ProjectionRegistry.getProjection().eastNorth2latlon(new EastNorth(origin.getX(), origin.getY()));
     56        final ILatLon relCoor = ProjectionRegistry.getProjection().eastNorth2latlon(
    5757                new EastNorth(origin.getX() + 1, origin.getY() + 1));
    5858
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Route.java

    r34976 r35978  
    5252            Node last = nodes.get(0);
    5353            for (Node n : nodes.subList(1, nodes.size())) {
    54                 length += last.getCoor().greatCircleDistance(n.getCoor());
     54                length += last.greatCircleDistance(n);
    5555                last = n;
    5656            }
Note: See TracChangeset for help on using the changeset viewer.