Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 16863)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 16864)
@@ -22,4 +22,5 @@
 import org.openstreetmap.josm.gui.io.importexport.GpxImporter.GpxImporterData;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
+import org.openstreetmap.josm.gui.layer.GpxRouteLayer;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
@@ -144,4 +145,5 @@
             addOrMergeLayer(gpxLayer, findGpxMergeLayer());
             addOrMergeLayer(layers.getMarkerLayer(), findMarkerMergeLayer(gpxLayer));
+            addOrMergeLayer(layers.getGpxRouteLayer(), findGpxRouteMergeLayer(gpxLayer));
 
             layers.getPostLayerTask().run();
@@ -190,4 +192,10 @@
         }
 
+        private GpxRouteLayer findGpxRouteMergeLayer(GpxLayer fromLayer) {
+            return MainApplication.getLayerManager().getLayersOfType(GpxRouteLayer.class).stream()
+                    .filter(l -> fromLayer != null && l.fromLayer == fromLayer)
+                    .findFirst().orElse(null);
+        }
+
         @Override
         protected void cancel() {
Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 16863)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 16864)
@@ -905,5 +905,4 @@
         private int idxTracks;
         private Iterator<IGpxTrackSegment> itTrackSegments;
-        private final Iterator<GpxRoute> itRoutes;
 
         private Line next;
@@ -921,5 +920,4 @@
             itTracks = data.tracks.iterator();
             idxTracks = -1;
-            itRoutes = data.routes.iterator();
             this.trackVisibility = trackVisibility;
             next = getNext();
@@ -961,7 +959,4 @@
                     itTracks = null;
                 }
-            }
-            if (itRoutes.hasNext()) {
-                return new Line(itRoutes.next());
             }
             return null;
Index: /trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxImporter.java	(revision 16863)
+++ /trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxImporter.java	(revision 16864)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
+import org.openstreetmap.josm.gui.layer.GpxRouteLayer;
 import org.openstreetmap.josm.gui.layer.ImageryLayer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -41,4 +42,8 @@
         private final GpxLayer gpxLayer;
         /**
+         * The imported GPX route layer. May be null if no marker.
+         */
+        private final GpxRouteLayer gpxRouteLayer;
+        /**
          * The imported marker layer. May be null if no marker.
          */
@@ -55,6 +60,7 @@
          * @param postLayerTask The task to run after GPX and/or marker layer has been added to MapView.
          */
-        public GpxImporterData(GpxLayer gpxLayer, MarkerLayer markerLayer, Runnable postLayerTask) {
+        public GpxImporterData(GpxLayer gpxLayer, GpxRouteLayer gpxRouteLayer, MarkerLayer markerLayer, Runnable postLayerTask) {
             this.gpxLayer = gpxLayer;
+            this.gpxRouteLayer = gpxRouteLayer;
             this.markerLayer = markerLayer;
             this.postLayerTask = postLayerTask;
@@ -67,4 +73,12 @@
         public GpxLayer getGpxLayer() {
             return gpxLayer;
+        }
+
+        /**
+         * Returns the imported GPX route layer. May be null if no GPX data.
+         * @return the imported GPX route layer. May be null if no GPX data.
+         */
+        public GpxRouteLayer getGpxRouteLayer() {
+            return gpxRouteLayer;
         }
 
@@ -128,4 +142,7 @@
                 MainApplication.getLayerManager().addLayer(data.markerLayer);
             }
+            if (data.gpxRouteLayer != null) {
+                MainApplication.getLayerManager().addLayer(data.gpxRouteLayer);
+            }
             if (data.gpxLayer != null) {
                 MainApplication.getLayerManager().addLayer(data.gpxLayer);
@@ -147,4 +164,5 @@
             final String gpxLayerName, String markerLayerName) {
         MarkerLayer markerLayer = null;
+        GpxRouteLayer gpxRouteLayer = null;
         GpxLayer gpxLayer = new GpxLayer(data, gpxLayerName, data.storageFile != null);
         if (Config.getPref().getBoolean("marker.makeautomarkers", true) && !data.waypoints.isEmpty()) {
@@ -155,4 +173,7 @@
                 gpxLayer.setLinkedMarkerLayer(markerLayer);
             }
+        }
+        if (Config.getPref().getBoolean("gpx.makeautoroutes", true)) {
+            gpxRouteLayer = new GpxRouteLayer(tr("Routes from {0}", gpxLayerName), gpxLayer);
         }
 
@@ -182,5 +203,5 @@
             }
         };
-        return new GpxImporterData(gpxLayer, markerLayer, postLayerTask);
+        return new GpxImporterData(gpxLayer, gpxRouteLayer, markerLayer, postLayerTask);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/GpxRouteLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/GpxRouteLayer.java	(revision 16864)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/GpxRouteLayer.java	(revision 16864)
@@ -0,0 +1,98 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.layer;
+
+import static org.openstreetmap.josm.tools.I18n.trn;
+
+import java.awt.Graphics2D;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import javax.swing.Action;
+import javax.swing.Icon;
+
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.gpx.GpxRoute;
+import org.openstreetmap.josm.data.gpx.Line;
+import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper;
+import org.openstreetmap.josm.tools.Utils;
+
+/**
+ * A layer that displays {@linkplain org.openstreetmap.josm.data.gpx.GpxData#routes} from a GPX file.
+ */
+public class GpxRouteLayer extends AbstractModifiableLayer {
+
+    public final GpxLayer fromLayer;
+    private final Collection<GpxRoute> routes = new ArrayList<>();
+
+    public GpxRouteLayer() {
+        this(null, null);
+    }
+
+    public GpxRouteLayer(String name, GpxLayer fromLayer) {
+        super(name);
+        this.fromLayer = fromLayer;
+        if (fromLayer != null) {
+            this.routes.addAll(fromLayer.data.routes);
+        }
+    }
+
+    @Override
+    public boolean isModified() {
+        return fromLayer.isModified();
+    }
+
+    @Override
+    public Icon getIcon() {
+        return null;
+    }
+
+    @Override
+    public String getToolTipText() {
+        final String tooltip = trn("{0} route, ", "{0} routes, ", routes.size(), routes.size());
+        return Utils.strip(tooltip, " ,");
+    }
+
+    @Override
+    public void mergeFrom(Layer from) {
+        if (from instanceof GpxRouteLayer) {
+            routes.addAll(((GpxRouteLayer) from).routes);
+        }
+    }
+
+    @Override
+    public boolean isMergable(Layer other) {
+        return other instanceof GpxRouteLayer;
+    }
+
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor v) {
+        fromLayer.visitBoundingBox(v);
+    }
+
+    @Override
+    public Object getInfoComponent() {
+        return null;
+    }
+
+    @Override
+    public Action[] getMenuEntries() {
+        return new Action[0];
+    }
+
+    @Override
+    public void paint(Graphics2D g, MapView mv, Bounds bbox) {
+        // unused - we use a painter so this is not called.
+    }
+
+    @Override
+    protected LayerPainter createMapViewPainter(MapViewEvent event) {
+        return new GpxDrawHelper(fromLayer) {
+            @Override
+            protected Iterable<Line> getLinesIterable(boolean[] trackVisibility) {
+                return () -> routes.stream().map(Line::new).iterator();
+            }
+        };
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 16863)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 16864)
@@ -370,5 +370,5 @@
 
         ensureTrackVisibilityLength();
-        for (Line segment : data.getLinesIterable(layer.trackVisibility)) {
+        for (Line segment : getLinesIterable(layer.trackVisibility)) {
 
             for (WayPoint pt : segment) {
@@ -396,4 +396,8 @@
     }
 
+    protected Iterable<Line> getLinesIterable(final boolean[] trackVisibility) {
+        return data.getLinesIterable(trackVisibility);
+    }
+
     /** ensures the trackVisibility array has the correct length without losing data.
      * TODO: Make this nicer by syncing the trackVisibility automatically.
@@ -508,5 +512,5 @@
             if (colored == ColorMode.VELOCITY) {
                 final List<Double> velocities = new ArrayList<>();
-                for (Line segment : data.getLinesIterable(null)) {
+                for (Line segment : getLinesIterable(null)) {
                     if (!forceLines) {
                         oldWp = null;
@@ -533,5 +537,5 @@
                 }
             } else if (colored == ColorMode.HDOP) {
-                for (Line segment : data.getLinesIterable(null)) {
+                for (Line segment : getLinesIterable(null)) {
                     for (WayPoint trkPnt : segment) {
                         Object val = trkPnt.get(GpxConstants.PT_HDOP);
@@ -573,5 +577,5 @@
 
         // Now the colors for all the points will be assigned
-        for (Line segment : data.getLinesIterable(null)) {
+        for (Line segment : getLinesIterable(null)) {
             if (!forceLines) { // don't draw lines between segments, unless forced to
                 oldWp = null;
