Ignore:
Timestamp:
2013-08-21T03:47:16+02:00 (11 years ago)
Author:
donvip
Message:

[josm_plugins] fix #8987 - bump min JOSM version of nearly all plugins to r6162 + code update/cleanup, fix warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java

    r28350 r29854  
    11package org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry;
    22
    3 import edu.princeton.cs.algs4.AssignmentProblem;
     3import static org.openstreetmap.josm.tools.I18n.tr;
     4
    45import java.awt.geom.Area;
    5 import java.awt.geom.Point2D;
    6 import java.util.*;
     6import java.util.AbstractMap;
     7import java.util.ArrayList;
     8import java.util.Arrays;
     9import java.util.Collection;
     10import java.util.HashMap;
     11import java.util.HashSet;
     12import java.util.LinkedList;
     13import java.util.List;
     14import java.util.Map;
     15import java.util.Set;
     16
    717import javax.swing.JOptionPane;
     18
    819import org.openstreetmap.josm.Main;
    920import org.openstreetmap.josm.actions.MergeNodesAction;
    10 import org.openstreetmap.josm.command.*;
    11 import org.openstreetmap.josm.data.osm.*;
     21import org.openstreetmap.josm.command.ChangeNodesCommand;
     22import org.openstreetmap.josm.command.ChangePropertyCommand;
     23import org.openstreetmap.josm.command.Command;
     24import org.openstreetmap.josm.command.DeleteCommand;
     25import org.openstreetmap.josm.command.MoveCommand;
     26import org.openstreetmap.josm.data.coor.LatLon;
     27import org.openstreetmap.josm.data.osm.Node;
     28import org.openstreetmap.josm.data.osm.OsmPrimitive;
     29import org.openstreetmap.josm.data.osm.Relation;
     30import org.openstreetmap.josm.data.osm.RelationMember;
     31import org.openstreetmap.josm.data.osm.RelationToChildReference;
     32import org.openstreetmap.josm.data.osm.TagCollection;
     33import org.openstreetmap.josm.data.osm.Way;
    1234import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1335import org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog;
    1436import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil;
    15 import static org.openstreetmap.josm.tools.I18n.tr;
     37
     38import edu.princeton.cs.algs4.AssignmentProblem;
    1639
    1740/**
     
    400423
    401424    protected static boolean isInArea(Node node, Area area) {
    402         if (node.isNewOrUndeleted() || area == null || area.contains(node.getCoor())) {
     425        LatLon ll = node.getCoor();
     426        if (node.isNewOrUndeleted() || area == null || area.contains(ll.getX(), ll.getY())) {
    403427            return true;
    404428        }
     
    481505        // TODO: use meters instead of degrees, but do it fast
    482506        double distance = Double.parseDouble(Main.pref.get("utilsplugin2.replace-geometry.max-distance", "1"));
    483         Point2D coor = node.getCoor();
     507        LatLon coor = node.getCoor();
    484508
    485509        for( Node n : nodes ) {
Note: See TracChangeset for help on using the changeset viewer.