Changeset 24088 in osm
- Timestamp:
- 2010-11-06T18:33:54+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressFinderThread.java
r24028 r24088 33 33 import org.xml.sax.SAXException; 34 34 35 /** 36 * The class AddressFinderThread scans the data set to find the best guess for a missing address field. 37 * 38 * The guessing procedure itself is implemented by defining "guessers" using the {@link GuessedValueHandler} 39 * class. A guessed field does not modify the corresponding property of {@link AddressNode} itself, but 40 * adds the guessed value to a shadowed field by calling {@link AddressNode#setGuessedValue(String, String)}. 41 */ 35 42 public class AddressFinderThread extends PleaseWaitRunnable implements Visitor { 36 43 private List<AddressNode> addressesToGuess; … … 38 45 private double minDist; 39 46 private AddressNode curAddressNode; 40 private boolean isRunning = false; 41 private String nearestName = null; 42 private String currentName = null; 47 private boolean isRunning = false; 43 48 private boolean cancelled; 44 49 … … 110 115 if (dist < minDist) { 111 116 minDist = dist; 112 nearestName = currentName;113 117 } 114 118 } … … 123 127 if (!TagUtils.hasNameTag(w)) return; 124 128 125 currentName = TagUtils.getNameValue(w);126 129 for (Node node : w.getNodes()) { 127 130 visit(node); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/AddressNode.java
r24028 r24088 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 19 20 /** 21 * The class AddressNode represents a single address node of OSM. It is a lightweight 22 * wrapper for a OSM node in order to simplify tag handling. 23 */ 20 24 public class AddressNode extends NodeEntityBase { 21 25 public static final String MISSING_TAG = "?"; -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixAddressesPlugin.java
r23964 r24088 18 18 import org.openstreetmap.josm.plugins.PluginInformation; 19 19 20 /** 21 * The Class FixAddressesPlugin is the main entry point for the plugin. 22 */ 20 23 public class FixAddressesPlugin extends Plugin { 21 24 22 25 /** 23 * Constructor for the AddressEdit plugin. 26 * Constructor for the AddressEdit plugin. Called by JOSM when loading the plugin. 24 27 * @param info Context information of the plugin. 25 28 */ -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixUnresolvedStreetsAction.java
r24028 r24088 16 16 17 17 /** 18 * Action to find and fix addresses without (valid) streets. 18 * Action to find and fix addresses without (valid) streets. It launches an dialog 19 * instance of {@link AddressEditDialog}. 20 * 19 21 * @author Oliver Wieland <oliver.wieland@online.de> 20 *21 22 */ 22 23 24 @SuppressWarnings("serial") 23 25 public class FixUnresolvedStreetsAction extends JosmAction implements SelectionChangedListener { 24 25 /**26 *27 */28 private static final long serialVersionUID = 1L;29 26 private AddressEditContainer addressEditContainer; 30 27 private Collection<? extends OsmPrimitive> newSelection; -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessedValueHandler.java
r24028 r24088 24 24 * The guess is determined by finding the closest way/node with the given tag. If no appropriate node 25 25 * is found within maximum distance, no guess is made. 26 26 * 27 * The default maximum distance is 100m. 27 28 */ 28 29 public class GuessedValueHandler implements Visitor { -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/ICommandListener.java
r23970 r24088 20 20 * Called by a node entity if a command has been created. Clients may collect 21 21 * these commands to define a sequence command. 22 * @param entity 23 * @param command 22 * @param entity The entity which created/used the command. 23 * @param command The command instance to process by the enclosing command listener. 24 24 */ 25 25 public void commandIssued(INodeEntity entity, Command command); -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/NodeEntityBase.java
r23971 r24088 27 27 import org.openstreetmap.josm.data.osm.Way; 28 28 29 /** 30 * The class NodeEntityBase provides a base implementation for the {@link INodeEntity} interface. 31 * 32 * The implementation comprises 33 * <ol> 34 * <li>Handle change listeners 35 * <li>Links the corresponding OSM object 36 * <li>Tag handling 37 * </ol> 38 */ 29 39 public class NodeEntityBase implements INodeEntity, Comparable<INodeEntity> { 30 40 public static final String ANONYMOUS = tr("No name");
Note:
See TracChangeset
for help on using the changeset viewer.