Ignore:
Timestamp:
2018-08-18T17:56:03+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java

    r33776 r34515  
    99import java.util.LinkedList;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.data.coor.CachedLatLon;
    1312import org.openstreetmap.josm.data.gpx.GpxTrack;
     
    1514import org.openstreetmap.josm.data.gpx.WayPoint;
    1615import org.openstreetmap.josm.data.projection.Projection;
     16import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    1717import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    3030    GPSBlamInputData(Point p1, Point p2, int radius) {
    3131        Collection<Layer> layers = MainApplication.getLayerManager().getLayers();
    32         Projection projection = Main.getProjection();
     32        Projection projection = ProjectionRegistry.getProjection();
    3333        for (Layer l : layers) {
    3434            if (l.isVisible() && l instanceof GpxLayer) {
    35                 for (GpxTrack track : ((GpxLayer)l).data.tracks) {
     35                for (GpxTrack track : ((GpxLayer) l).data.tracks) {
    3636                    for (GpxTrackSegment segment: track.getSegments()) {
    3737                        for (WayPoint wayPoint : segment.getWayPoints()) {
     
    6969                                    this.add(cll, wayPoint);
    7070                                }
    71                             } // end if circular else line based selection
    72                         } // end loop over wayponts in segment
    73                     } // end loop over segments in track
    74                 } // end loop over tracks in layer
    75             } // end if layer visible
    76         } // end loop over layers
    77     } // end constructor
     71                            }
     72                        }
     73                    }
     74                }
     75            }
     76        }
     77    }
    7878
    7979    private void add(CachedLatLon cll, WayPoint wayPoint) {
    8080        this.add(cll);
    8181        Calendar day = new GregorianCalendar();
    82         day.setTimeInMillis((long)wayPoint.time*1000);
     82        day.setTimeInMillis((long) (wayPoint.time*1000d));
    8383        day.set(Calendar.HOUR_OF_DAY, 0);
    8484        day.set(Calendar.MINUTE, 0);
  • applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMarker.java

    r33776 r34515  
    1111import java.awt.geom.Point2D;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.data.coor.CachedLatLon;
    1514import org.openstreetmap.josm.data.coor.EastNorth;
    1615import org.openstreetmap.josm.data.projection.Projection;
     16import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    1717import org.openstreetmap.josm.gui.MapView;
    1818
     
    2323    private static final double FAC = 2.45; // 2.45 gives 95% CI for 2D
    2424
    25     /** construct a blammarker by analysis of selected GPS points */
     25    /**
     26     * Construct a blammarker by analysis of selected GPS points
     27     * @param inputData input data
     28     */
    2629    GPSBlamMarker(GPSBlamInputData inputData) {
    27         Projection projection = Main.getProjection();
     30        Projection projection = ProjectionRegistry.getProjection();
    2831        // get mean east, north
    2932        double meanEast=0.0, meanNorth=0.0;
     
    6770
    6871        // save latlon coords of the mean and the ends of the crosshairs
    69         Projection proj = Main.getProjection();
     72        Projection proj = ProjectionRegistry.getProjection();
    7073        mean = new CachedLatLon(proj.eastNorth2latlon(new EastNorth(meanEast, meanNorth)));
    7174        hair1Coord1 = new CachedLatLon(proj.eastNorth2latlon(
     
    8891
    8992    void paint(Graphics2D g, MapView mv) {
    90         Projection projection = Main.getProjection();
     93        Projection projection = ProjectionRegistry.getProjection();
    9194        g.setColor(Color.GREEN);
    9295        g.setPaintMode();
Note: See TracChangeset for help on using the changeset viewer.