Ignore:
Timestamp:
2019-11-03T22:22:25+01:00 (5 years ago)
Author:
donvip
Message:

see #josm16796 - update to JOSM 15502 - use IGpxTrack in GpxData (patch by Bjoeni)

Location:
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationModel.java

    r35212 r35221  
    77import org.openstreetmap.josm.data.gpx.GpxData;
    88import org.openstreetmap.josm.data.gpx.GpxRoute;
    9 import org.openstreetmap.josm.data.gpx.GpxTrack;
     9import org.openstreetmap.josm.data.gpx.IGpxTrack;
    1010import org.openstreetmap.josm.data.gpx.IGpxTrackSegment;
    1111import org.openstreetmap.josm.data.gpx.IWithAttributes;
     
    147147
    148148    @Override
    149     public void beginTrack(GpxTrack track) {
     149    public void beginTrack(IGpxTrack track) {
    150150        createProfile(track);
    151151    }
    152152
    153153    @Override
    154     public void endTrack(GpxTrack track) {
     154    public void endTrack(IGpxTrack track) {
    155155        if (curProfile == null) throw new RuntimeException("Internal error: No elevation profile");
    156156
     
    160160
    161161    @Override
    162     public void beginTrackSegment(GpxTrack track, IGpxTrackSegment segment) {
     162    public void beginTrackSegment(IGpxTrack track, IGpxTrackSegment segment) {
    163163        // Nothing to do here for now
    164164    }
    165165
    166166    @Override
    167     public void endTrackSegment(GpxTrack track, IGpxTrackSegment segment) {
     167    public void endTrackSegment(IGpxTrack track, IGpxTrackSegment segment) {
    168168        // Nothing to do here for now
    169169    }
    170170
    171171    @Override
    172     public void visitTrackPoint(WayPoint wp, GpxTrack track, IGpxTrackSegment segment) {
     172    public void visitTrackPoint(WayPoint wp, IGpxTrack track, IGpxTrackSegment segment) {
    173173        processWayPoint(wp);
    174174    }
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/GpxIterator.java

    r35212 r35221  
    66import org.openstreetmap.josm.data.gpx.GpxData;
    77import org.openstreetmap.josm.data.gpx.GpxRoute;
    8 import org.openstreetmap.josm.data.gpx.GpxTrack;
     8import org.openstreetmap.josm.data.gpx.IGpxTrack;
    99import org.openstreetmap.josm.data.gpx.IGpxTrackSegment;
    1010import org.openstreetmap.josm.data.gpx.WayPoint;
     
    4747
    4848        // tracks
    49         for (GpxTrack trk : data.tracks) {
     49        for (IGpxTrack trk : data.tracks) {
    5050            visitTrack(visitor, trk);
    5151        }
     
    5858     *            The visitor which inspects all GPX entities.
    5959     */
    60     public static void visit(GpxTrack track, IGpxVisitor visitor) {
     60    public static void visit(IGpxTrack track, IGpxVisitor visitor) {
    6161        visitTrack(visitor, track);
    6262    }
     
    7474    // ---------------------- Helper methods ----------------
    7575
    76     private static void visitTrack(IGpxVisitor visitor, GpxTrack trk) {
     76    private static void visitTrack(IGpxVisitor visitor, IGpxTrack trk) {
    7777        if (trk == null) return;
    7878        if (visitor == null) return;
  • applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/IGpxVisitor.java

    r35212 r35221  
    33
    44import org.openstreetmap.josm.data.gpx.GpxRoute;
    5 import org.openstreetmap.josm.data.gpx.GpxTrack;
     5import org.openstreetmap.josm.data.gpx.IGpxTrack;
    66import org.openstreetmap.josm.data.gpx.IGpxTrackSegment;
    77import org.openstreetmap.josm.data.gpx.WayPoint;
     
    2525     * Starts a GPX track.
    2626     */
    27     void beginTrack(GpxTrack track);
     27    void beginTrack(IGpxTrack track);
    2828
    2929    /**
    3030     * Ends a GPX track.
    3131     */
    32     void endTrack(GpxTrack track);
     32    void endTrack(IGpxTrack track);
    3333
    3434    /**
     
    4646     * Starts a segment within a GPX track.
    4747     */
    48     void beginTrackSegment(GpxTrack track, IGpxTrackSegment segment);
     48    void beginTrackSegment(IGpxTrack track, IGpxTrackSegment segment);
    4949
    5050    /**
    5151     * Ends a segment within a GPX track.
    5252     */
    53     void endTrackSegment(GpxTrack track, IGpxTrackSegment segment);
     53    void endTrackSegment(IGpxTrack track, IGpxTrackSegment segment);
    5454
    5555    /**
     
    6767     * @param segment the track segment
    6868     */
    69     void visitTrackPoint(WayPoint wp, GpxTrack track, IGpxTrackSegment segment);
     69    void visitTrackPoint(WayPoint wp, IGpxTrack track, IGpxTrackSegment segment);
    7070
    7171    /**
Note: See TracChangeset for help on using the changeset viewer.