Changeset 23877 in osm for applications
- Timestamp:
- 2010-10-27T21:14:43+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/AddressEditContainer.java
r23854 r23877 142 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 }147 144 } else { 148 145 throw new RuntimeException("Street node is null!"); … … 166 163 @Override 167 164 public void visit(Relation e) { 168 // TODO Auto-generated method stub169 170 165 } 171 166 … … 175 170 @Override 176 171 public void visit(Changeset cs) { 177 // TODO Auto-generated method stub178 179 172 } 180 173 -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/StreetNode.java
r23854 r23877 19 19 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 import org.openstreetmap.josm.data.osm.Way;22 21 23 22 /** … … 137 136 } 138 137 139 /**140 * Returns true, if the street node contains disconnected segments. This is usually141 * an indication, that the data set contains two streets with same name, but e. g. in142 * different cities.143 * @return144 */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 162 138 /* (non-Javadoc) 163 139 * @see org.openstreetmap.josm.plugins.addressEdit.NodeEntityBase#toString()
Note:
See TracChangeset
for help on using the changeset viewer.