Ignore:
Timestamp:
2018-08-11T17:29:48+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - deprecate all Main methods related to projections. New ProjectionRegistry class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java

    r13257 r14120  
    2020import java.util.stream.Stream;
    2121
    22 import org.openstreetmap.josm.Main;
    2322import org.openstreetmap.josm.data.Bounds;
    2423import org.openstreetmap.josm.data.Data;
     
    2625import org.openstreetmap.josm.data.coor.EastNorth;
    2726import org.openstreetmap.josm.data.gpx.GpxTrack.GpxTrackChangeListener;
     27import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2828import org.openstreetmap.josm.gui.MainApplication;
    2929import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    539539                WayPoint r = null;
    540540                for (WayPoint wpSeg : seg.getWayPoints()) {
    541                     EastNorth en = wpSeg.getEastNorth(Main.getProjection());
     541                    EastNorth en = wpSeg.getEastNorth(ProjectionRegistry.getProjection());
    542542                    if (r == null) {
    543543                        r = wpSeg;
     
    586586                }
    587587                if (r != null) {
    588                     EastNorth c = r.getEastNorth(Main.getProjection());
     588                    EastNorth c = r.getEastNorth(ProjectionRegistry.getProjection());
    589589                    /* if there is only one point in the seg, it will do this twice, but no matter */
    590590                    rx = c.east();
     
    603603        if (bestEN == null)
    604604            return null;
    605         WayPoint best = new WayPoint(Main.getProjection().eastNorth2latlon(bestEN));
     605        WayPoint best = new WayPoint(ProjectionRegistry.getProjection().eastNorth2latlon(bestEN));
    606606        best.time = bestTime;
    607607        return best;
Note: See TracChangeset for help on using the changeset viewer.