Changes between Version 12 and Version 13 of Rules/PublicTransportGtfs


Ignore:
Timestamp:
2020-07-25T14:54:37+02:00 (6 years ago)
Author:
skyper
Comment:

test stops for vehicle

Legend:

Unmodified
Added
Removed
Modified
  • Rules/PublicTransportGtfs

    v12 v13  
    5555}
    5656
    57 /*  Class  */
     57/*  -----------------------
     58 *
     59 *       Classes
     60 */
    5861
    5962relation[type=route_master][route_master =~ /^(bus|share_taxi|trolleybus|train|tram|light_rail|subway|monorail|ferry)$/] {
     
    7073}
    7174
    72 
    73 /*  Rules  */
    74 
    75 /*  -----------------------
     75*[!aerialway][bus!=yes][share_taxi!=yes][trolleybus!=yes][train!=yes][tram!=yes][light_rail!=yes][subway!=yes][monorail!=yes][ferry!=yes] {
     76  set noPtVehicle;
     77}
     78
     79/*  -----------------------
     80 *
     81 *        Rules
     82 */
     83
     84/*  -----------------------
     85 *
    7686 *  missing tag
    7787 */
     
    166176}
    167177
     178/* {0.tag} without any (warning level) */
     179
     180/* platform and stop_position */
     181*[public_transport =~ /^(platform|stop_position)$/][highway!=bus_stop][public_transport].noPtVehicle {
     182  throwWarning: tr("`{0}` without serving vehicle type specified.", "{1.tag}");
     183  group: tr("Public Transport GTFS: missing tag");
     184  assertMatch:   "relation public_transport=platform";
     185  assertNoMatch: "relation public_transport=platform highway=bus_stop";
     186}
     187
    168188/* {0.tag} and {1.tag} without {2.key} (warning level) */
    169189
     
    180200
    181201/* platform */
    182 *[public_transport=platform][highway=bus_stop][bus!=yes][share_taxi!=yes][trolleybus!=yes] {
    183   throwWarning: tr("`{0}` with `{1}` but none of `{2}*`, `{3}*` or `{4}*`.", "{0.tag}", "{1.tag}", "{2.tag}", "{3.tag}", "{4.tag}");
     202*[public_transport =~ /^(platform|stop_position)$/][highway=bus_stop][bus!=yes][share_taxi!=yes][trolleybus!=yes][public_transport] {
     203  throwWarning: tr("`{0}` with `{1}` but none of `{2}*`, `{3}*` or `{4}*`.", "{5.tag}", "{1.tag}", "{2.tag}", "{3.tag}", "{4.tag}");
    184204  group: tr("Public Transport GTFS: missing tag");
    185205  assertMatch:   "node public_transport=platform highway=bus_stop";
     
    261281 */
    262282
     283/* ref:IFOPT, gtfs:stop_id, local_ref */
     284*[public_transport][public_transport =~ /^(platform|stop_position)$/][!(tag("local_ref") == get(regexp_match("^(.*:){4}([1-9][0-9]?)", tag("ref:IFOPT")), 2))][local_ref][ref:IFOPT] {
     285  throwWarning:  tr("`{0}` conflicts with `{1}`.", "{3.tag}", "{4.tag}");
     286  group: tr("Public Transport GTFS: conflicting tags");
     287  assertMatch:   "relation public_transport=platform local_ref=14 ref:IFOPT=de:08315:6504:0:1";
     288  assertNoMatch: "relation public_transport=platform local_ref=14 ref:IFOPT=de:08315:6504:0:14";
     289  assertNoMatch: "relation public_transport=platform local_ref=14 ref:IFOPT=de:08315:6504:14";
     290}
     291
    263292/* route_id, shape_id, trip_id */
    264293/* FIXME: How to check proper syntax with multiple values */
     
    297326}
    298327
    299 /* ref:IFOPT, gtfs:stop_id, local_ref */
    300 *[public_transport][public_transport =~ /^(platform|stop_position)$/][!(tag("local_ref") == get(regexp_match("^(.*:){4}([1-9][0-9]?)", tag("ref:IFOPT")), 2))][local_ref][ref:IFOPT] {
    301   throwWarning:  tr("`{0}` conflicts with `{1}`.", "{3.tag}", "{4.tag}");
    302   group: tr("Public Transport GTFS: conflicting tags");
    303   assertMatch:   "relation public_transport=platform local_ref=14 ref:IFOPT=de:08315:6504:0:1";
    304   assertNoMatch: "relation public_transport=platform local_ref=14 ref:IFOPT=de:08315:6504:0:14";
    305   assertNoMatch: "relation public_transport=platform local_ref=14 ref:IFOPT=de:08315:6504:14";
    306 }
    307 
    308328
    309329/*  -----------------------