Changeset 29854 in osm for applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap
- Timestamp:
- 2013-08-21T03:47:16+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java
r28350 r29854 1 1 package org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry; 2 2 3 import edu.princeton.cs.algs4.AssignmentProblem; 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.geom.Area; 5 import java.awt.geom.Point2D; 6 import java.util.*; 6 import java.util.AbstractMap; 7 import java.util.ArrayList; 8 import java.util.Arrays; 9 import java.util.Collection; 10 import java.util.HashMap; 11 import java.util.HashSet; 12 import java.util.LinkedList; 13 import java.util.List; 14 import java.util.Map; 15 import java.util.Set; 16 7 17 import javax.swing.JOptionPane; 18 8 19 import org.openstreetmap.josm.Main; 9 20 import org.openstreetmap.josm.actions.MergeNodesAction; 10 import org.openstreetmap.josm.command.*; 11 import org.openstreetmap.josm.data.osm.*; 21 import org.openstreetmap.josm.command.ChangeNodesCommand; 22 import org.openstreetmap.josm.command.ChangePropertyCommand; 23 import org.openstreetmap.josm.command.Command; 24 import org.openstreetmap.josm.command.DeleteCommand; 25 import org.openstreetmap.josm.command.MoveCommand; 26 import org.openstreetmap.josm.data.coor.LatLon; 27 import org.openstreetmap.josm.data.osm.Node; 28 import org.openstreetmap.josm.data.osm.OsmPrimitive; 29 import org.openstreetmap.josm.data.osm.Relation; 30 import org.openstreetmap.josm.data.osm.RelationMember; 31 import org.openstreetmap.josm.data.osm.RelationToChildReference; 32 import org.openstreetmap.josm.data.osm.TagCollection; 33 import org.openstreetmap.josm.data.osm.Way; 12 34 import org.openstreetmap.josm.gui.DefaultNameFormatter; 13 35 import org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog; 14 36 import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil; 15 import static org.openstreetmap.josm.tools.I18n.tr; 37 38 import edu.princeton.cs.algs4.AssignmentProblem; 16 39 17 40 /** … … 400 423 401 424 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())) { 403 427 return true; 404 428 } … … 481 505 // TODO: use meters instead of degrees, but do it fast 482 506 double distance = Double.parseDouble(Main.pref.get("utilsplugin2.replace-geometry.max-distance", "1")); 483 Point2Dcoor = node.getCoor();507 LatLon coor = node.getCoor(); 484 508 485 509 for( Node n : nodes ) {
Note:
See TracChangeset
for help on using the changeset viewer.