Changeset 16570 in josm


Ignore:
Timestamp:
2020-06-08T18:24:14+02:00 (4 years ago)
Author:
GerdP
Message:

see #19199: There should be some way to determine how many nodes are superflous in a way

  • show number of nodes also when converting gpx to data layer

19199.gpx_to_osm.patch by taylor.smock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java

    r15419 r16570  
    99import java.io.File;
    1010import java.util.ArrayList;
     11import java.util.List;
    1112
    1213import javax.swing.AbstractAction;
     
    1718import org.openstreetmap.josm.actions.SimplifyWayAction;
    1819import org.openstreetmap.josm.data.osm.DataSet;
     20import org.openstreetmap.josm.data.osm.Way;
    1921import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    2022import org.openstreetmap.josm.gui.MainApplication;
     
    6567        final DataSet ds = convert();
    6668        if (ds != null) {
    67             double err = SimplifyWayAction.askSimplifyWays(tr("Would you like to simplify the ways in the converted layer?"), true);
     69            List<Way> ways = new ArrayList<>(ds.getWays());
     70            double err = SimplifyWayAction.askSimplifyWays(ways, tr("Would you like to simplify the ways in the converted layer?"), true);
    6871            if (err > 0) {
    69                 SimplifyWayAction.simplifyWays(new ArrayList<>(ds.getWays()), err);
     72                SimplifyWayAction.simplifyWays(ways, err);
    7073            }
    7174            final OsmDataLayer osmLayer = new OsmDataLayer(ds, tr("Converted from: {0}", layer.getName()), null);
Note: See TracChangeset for help on using the changeset viewer.