Changeset 23854 in osm
- Timestamp:
- 2010-10-26T21:55:38+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/AddressEditContainer.java
r23853 r23854 139 139 140 140 if (sNode != null) { 141 // TODO: Check if s gemnt really belongs to the street, even if the142 // names are the same. 141 // TODO: Check if segment really belongs to the street, even if the 142 // names are the same. Then the streets should be split up... 143 143 sNode.addStreetSegment(newSegment); 144 if (sNode.hasDisconnectedSegments()) { 145 System.out.println("Warnig: Disconnected street: " + sNode.getName()); 146 } 144 147 } else { 145 148 throw new RuntimeException("Street node is null!"); -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/StreetNode.java
r23834 r23854 19 19 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 import org.openstreetmap.josm.data.osm.Way; 21 22 22 23 /** … … 136 137 } 137 138 139 /** 140 * Returns true, if the street node contains disconnected segments. This is usually 141 * an indication, that the data set contains two streets with same name, but e. g. in 142 * different cities. 143 * @return 144 */ 145 public boolean hasDisconnectedSegments() { 146 for (INodeEntity ne1 : children) { 147 if (!(ne1 instanceof StreetSegmentNode)) continue; 148 Way w1 = (Way)ne1.getOsmObject(); 149 for (INodeEntity ne2 : children) { 150 if (!(ne2 instanceof StreetSegmentNode) || ne1 == ne2) continue; 151 152 Way w2 = (Way)ne1.getOsmObject(); 153 if (!WayUtils.areWaysConnected(w1, w2)) { 154 return true; 155 } 156 } 157 } 158 159 return false; 160 } 161 138 162 /* (non-Javadoc) 139 163 * @see org.openstreetmap.josm.plugins.addressEdit.NodeEntityBase#toString()
Note:
See TracChangeset
for help on using the changeset viewer.