Changeset 32221 in osm for applications/editors/josm/plugins
- Timestamp:
- 2016-06-06T16:59:05+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/pt_assistant
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/PTAssistantPlugin.java
r32209 r32221 7 7 import org.openstreetmap.josm.plugins.pt_assistant.validation.GapTest; 8 8 import org.openstreetmap.josm.plugins.pt_assistant.validation.PlatformsFirstTest; 9 import org.openstreetmap.josm.plugins.pt_assistant.validation.RoadTypeTest; 9 10 10 11 /** … … 27 28 28 29 OsmValidator.addTest(PlatformsFirstTest.class); 30 OsmValidator.addTest(RoadTypeTest.class); 29 31 OsmValidator.addTest(GapTest.class); 30 32 -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java
r32219 r32221 58 58 * can be modeled with ways. 59 59 * 60 * @param rm relation member to be checked 61 * @return true if the relation member refers to a way in a public transport route, false otherwise. 60 * @param rm 61 * relation member to be checked 62 * @return true if the relation member refers to a way in a public transport 63 * route, false otherwise. 62 64 */ 63 65 public static boolean isPTWay(RelationMember rm) { … … 74 76 } 75 77 78 /** 79 * Checks if the type of the way is suitable for buses to go on it. The 80 * direction of the way (i.e. one-way roads) is irrelevant for this test. 81 * 82 * @param way 83 * to be checked 84 * @return true if the way is suitable for buses, false otherwise. 85 */ 86 public static boolean isWaySuitableForBuses(Way way) { 87 if (way.hasTag("highway", "motorway") || way.hasTag("highway", "trunk") || way.hasTag("highway", "primary") 88 || way.hasTag("highway", "secondary") || way.hasTag("highway", "tertiary") 89 || way.hasTag("highway", "unclassified") || way.hasTag("highway", "road") 90 || way.hasTag("highway", "residential") || way.hasTag("highway", "service") 91 || way.hasTag("highway", "motorway_link") || way.hasTag("highway", "trunk_link") 92 || way.hasTag("highway", "primary_link") || way.hasTag("highway", "secondary_link") 93 || way.hasTag("highway", "tertiary_link") || way.hasTag("highway", "living_street") 94 || way.hasTag("highway", "bus_guideway") || way.hasTag("highway", "road") 95 || way.hasTag("cycleway", "share_busway") || way.hasTag("cycleway", "shared_lane")) { 96 return true; 97 } 98 99 return false; 100 } 101 102 76 103 } -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/GapTest.java
r32219 r32221 177 177 final List<RelationMember> ways = new ArrayList<>(); 178 178 for (RelationMember member : members) { 179 if (member.hasRole("") && OsmPrimitiveType.WAY.equals(member.getType())) { 179 if (member.hasRole("") && OsmPrimitiveType.WAY.equals(member.getType())) { // FIXME 180 180 ways.add(member); 181 181 } else { // stops (and if the relation has anything
Note:
See TracChangeset
for help on using the changeset viewer.