Changeset 24119 in osm
- Timestamp:
- 2010-11-07T18:04:10+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/GuessAddressRunnable.java
r24096 r24119 207 207 208 208 // visit osm data 209 for (OsmPrimitive osmPrimitive : Main.main.getCurrentDataSet(). getWays()) {209 for (OsmPrimitive osmPrimitive : Main.main.getCurrentDataSet().allPrimitives()) { 210 210 if (cancelled) { 211 211 break; … … 214 214 // guess values 215 215 for (int i = 0; i < guessers.length; i++) { 216 if (!guessers[i].needsGuess()) continue;217 218 216 osmPrimitive.visit(guessers[i]); 219 217 220 218 if (guessers[i].currentValue == null && i == 0) { 221 System.err.println("Guess #" + i + " failed for " + aNode);219 //System.err.println("Guess #" + i + " failed for " + aNode); 222 220 } 223 221 } … … 236 234 237 235 public GuessStreetValueHandler(String tag, OSMAddress aNode) { 238 super(tag, aNode );236 super(tag, aNode, 200.0); 239 237 } 240 238 … … 255 253 OSMAddress aNode = getAddressNode(); 256 254 double dist = OsmUtils.getMinimumDistanceToWay(aNode.getCoor(), w); 255 257 256 if (dist < minDist && dist < getMaxDistance()) { 257 //System.out.println(String.format("New guess %s: %4.2f m", TagUtils.getNameValue(w), dist)); 258 258 minDist = dist; 259 259 currentValue = TagUtils.getNameValue(w); 260 260 aNode.setGuessedValue(getTag(), currentValue); 261 } else { 262 //System.out.println(String.format("Skipped %s: %4.2f m", TagUtils.getNameValue(w), dist)); 261 263 } 262 264 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmUtils.java
r24115 r24119 138 138 applyDerivedValue(address, w, TagUtils.ADDR_COUNTRY_TAG); 139 139 applyDerivedValue(address, w, TagUtils.ADDR_STREET_TAG); 140 applyDerivedValue(address, w, TagUtils.ADDR_STATE_TAG); 140 141 return true; 141 142 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/TagUtils.java
r24115 r24119 1907 1907 String hwType = getHighwayValue(w); 1908 1908 1909 return HIGHWAY_RESIDENTIAL_VALUE.equals(hwType) || 1910 HIGHWAY_SECONDARY_VALUE.equals(hwType) || 1911 HIGHWAY_TERTIARY_VALUE.equals(hwType) || 1912 HIGHWAY_SERVICE_VALUE.equals(hwType) || 1913 HIGHWAY_LIVING_STREET_VALUE.equals(hwType) || 1914 HIGHWAY_UNCLASSIFIED_VALUE.equals(hwType); 1909 return !(TagUtils.HIGHWAY_MOTORWAY_LINK_VALUE.equals(hwType) || 1910 TagUtils.HIGHWAY_MOTORWAY_VALUE.equals(hwType) || 1911 TagUtils.HIGHWAY_FOOTWAY_VALUE.equals(hwType) || 1912 TagUtils.HIGHWAY_TRACK_VALUE.equals(hwType) 1913 ); 1915 1914 } 1916 1915
Note:
See TracChangeset
for help on using the changeset viewer.