Changeset 33469 in osm for applications
- Timestamp:
- 2017-07-25T14:37:49+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java
r33453 r33469 20 20 21 21 private static final String PT_VERSION_TAG = "public_transport:version"; 22 private static final String TAG_ROUTE = "route"; 22 23 private RouteUtils() { 23 24 // private constructor for util classes … … 69 70 "tram", "light_rail", "subway", "train"}; 70 71 71 return r.hasTag( "route", acceptedRouteTags);72 return r.hasTag(TAG_ROUTE, acceptedRouteTags); 72 73 } 73 74 74 75 public static boolean isRoute(Relation r) { 75 return r.get( "route") != null;76 return r.get(TAG_ROUTE) != null; 76 77 } 77 78 … … 231 232 || way.hasTag("railway", acceptedRailwayTags); 232 233 } 234 235 public static boolean isBicycleRoute(Relation r) { 236 if (r == null) { 237 return false; 238 } 239 240 return r.hasTag(TAG_ROUTE, "bicycle"); 241 } 242 243 public static boolean isFootRoute(Relation r) { 244 if (r == null) { 245 return false; 246 } 247 248 return r.hasTag(TAG_ROUTE, "foot", "walking", "hiking"); 249 } 250 251 public static boolean isHorseRoute(Relation r) { 252 if (r == null) { 253 return false; 254 } 255 256 return r.hasTag(TAG_ROUTE, "horse"); 257 } 233 258 }
Note:
See TracChangeset
for help on using the changeset viewer.