Changeset 32622 in osm for applications/editors/josm
- Timestamp:
- 2016-07-10T22:20:44+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/gui/PTAssistantPaintVisitor.java
r32597 r32622 10 10 import java.util.HashMap; 11 11 import java.util.List; 12 13 import javax.swing.JOptionPane;14 12 15 13 import org.openstreetmap.josm.data.osm.Node; -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java
r32616 r32622 202 202 return false; 203 203 } 204 205 public static boolean isWaySuitableForPublicTransport(Way way) { 206 207 if (isWaySuitableForBuses(way) || way.hasTag("railway", "tram") 208 || way.hasTag("railway", "subway") || way.hasTag("raiilway", "subway") 209 || way.hasTag("railway", "light_rail") 210 || way.hasTag("railway", "train")) { 211 return true; 212 } 213 214 return false; 215 216 } 204 217 205 218 } -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/NodeChecker.java
r32616 r32622 34 34 if (referrer.getType().equals(OsmPrimitiveType.WAY)) { 35 35 Way referrerWay = (Way) referrer; 36 if (RouteUtils.isWaySuitableForBuses(referrerWay) || referrerWay.hasTag("railway", "tram") 37 || referrerWay.hasTag("railway", "subway") || referrerWay.hasTag("raiilway", "subway") 38 || referrerWay.hasTag("railway", "light_rail") 39 || referrerWay.hasTag("railway", "construction")) { 36 if (RouteUtils.isWaySuitableForPublicTransport(referrerWay)) { 40 37 return; 41 38 } … … 65 62 primitives.add(node); 66 63 if (referrer.getType().equals(OsmPrimitiveType.WAY)) { 67 TestError e = new TestError(this.test, Severity.WARNING, 68 tr("PT: Platform should not be part of a way"), 69 PTAssistantValidatorTest.ERROR_CODE_PLATFORM_PART_OF_HIGHWAY, primitives); 70 errors.add(e); 71 return; 64 Way referringWay = (Way) referrer; 65 if (RouteUtils.isWaySuitableForPublicTransport(referringWay)) { 66 TestError e = new TestError(this.test, Severity.WARNING, 67 tr("PT: Platform should not be part of a way"), 68 PTAssistantValidatorTest.ERROR_CODE_PLATFORM_PART_OF_HIGHWAY, primitives); 69 errors.add(e); 70 return; 71 } 72 72 } 73 73 } -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/WayChecker.java
r32616 r32622 201 201 // highlighted.add(problematicWay); 202 202 Set<Way> adjacentWays = checkAdjacentWays(problematicWay, new HashSet<Way>()); 203 adjacentWays.removeAll(problematicWays); 203 adjacentWays.removeAll(problematicWays); 204 204 highlighted.add(problematicWay); 205 205 highlighted.addAll(adjacentWays); … … 209 209 this.errors.add(e); 210 210 } 211 212 // Set<Way> primitivesToReport = new HashSet<>(); 213 // primitivesToReport.addAll(problematicWays); 214 // for (Way problematicWay : problematicWays) { 215 // Set<Way> adjacentWays = checkAdjacentWays(problematicWay, new HashSet<Way>()); 216 // primitivesToReport.addAll(adjacentWays); 217 // } 218 // 219 // List<Relation> primitives = new ArrayList<>(1); 220 // primitives.add(relation); 221 // TestError e = new TestError(this.test, Severity.WARNING, 222 // tr("PT: Route passes a oneway road in the wrong direction"), 223 // PTAssistantValidatorTest.ERROR_CODE_DIRECTION, primitives, primitivesToReport); 224 // this.errors.add(e); 211 225 212 226 }
Note:
See TracChangeset
for help on using the changeset viewer.