Changes between Version 23 and Version 24 of Rules/PublicTransportGtfs
- Timestamp:
- 2020-08-14T14:19:22+02:00 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Rules/PublicTransportGtfs
v23 v24 65 65 set PtRouteMaster; 66 66 } 67 /* Not only relationsas ferry can be a way*/68 *[type=route ][route =~ /^(bus|coach|share_taxi|trolleybus|train|light_rail|subway|tram|monorail|funicular|ferry|aerialway|school_bus|walking_bus)$/] {67 /* Note: Only relations, routes on way are not supported */ 68 relation[type=route ][route =~ /^(bus|coach|share_taxi|trolleybus|train|light_rail|subway|tram|monorail|funicular|ferry|aerialway|school_bus|walking_bus)$/] { 69 69 set PtRoute; 70 70 } … … 78 78 } 79 79 80 *[public_transport =~ /^(platform|stop_area|stop_position)$/] { 81 set PtStop; 82 } 83 80 84 /* ----------------------- 81 85 * … … 90 94 /* {0.tag} without {1.key} (error level) */ 91 95 92 /* route_master and route relations , ToDo ferry on ways*/96 /* route_master and route relations */ 93 97 94 98 /* {0.tag} without {1.key} (warning level) */ 95 99 96 /* stop_position, platform */ 100 /* stop_area, stop_position, platform */ 97 101 *[public_transport =~ /^(platform|stop_position)$/][public_transport][!local_ref], 98 * [public_transport =~ /^(platform|stop_position)$/][public_transport][!network] {102 *.PtStop[public_transport][!network] { 99 103 throwWarning: tr("`{0}` without `{1}*`.", "{1.tag}", "{2.tag}"); 100 104 group: tr("Public Transport GTFS: missing tag"); … … 104 108 } 105 109 106 /* stop_area */ 107 108 /* route_master and route relations, ToDo ferry on ways */ 110 /* route_master and route relations */ 109 111 relation.PtRouteMaster[type=route_master][!colour], 110 112 relation.PtRouteMaster[type=route_master][!fee], … … 142 144 /* {0.tag} without {1.key} (info level) */ 143 145 144 /* route_master and route relations , ToDo ferry on ways*/146 /* route_master and route relations */ 145 147 relation.PtRouteMaster[type=route_master][!network:short], 146 148 relation.PtRouteMaster[type=route_master][!operator:short], … … 155 157 /* {0.tag} without {1.key} or {2.key} (warning level) */ 156 158 157 /* stop_position, platform */ 158 * [public_transport =~ /^(platform|stop_area|stop_position)$/][!ref:IFOPT][!gtfs:stop_id][public_transport] {159 /* stop_are, stop_position, platform */ 160 *.PtStop[!ref:IFOPT][!gtfs:stop_id][public_transport] { 159 161 throwWarning: tr("`{0}` without `{1}*` or `{2}*`.", "{3.tag}", "{1.tag}", "{2.tag}"); 160 162 group: tr("Public Transport GTFS: missing tag"); … … 163 165 } 164 166 165 /* {0.tag} without {1.key}, {2.key} or {3.key} (warning level) */ 166 167 /* stop_position, platform */ 168 169 /* stop_area */ 170 171 /* route_master and route relations, ToDo ferry on ways */ 167 /* {0.key} without {1.key}, {2.key} or {3.key} (warning level) */ 168 169 /* stop_are, stop_position, platform */ 170 *.PtStop[ref:IFOPT ][!gtfs:feed][!network:guid][!operator:guid], 171 *.PtStop[gtfs:stop_id][!gtfs:feed][!network:guid][!operator:guid] { 172 throwWarning: tr("Public transport stop with `{0}=*` but none of `{1}*`, `{2}*` or `{3}*`.", "{1.key}", "{2.tag}", "{3.tag}", "{4.tag}"); 173 group: tr("Public Transport GTFS: missing tag"); 174 assertMatch: "node public_transport=stop_position ref:IFOPT=A"; 175 assertNoMatch: "node public_transport=stop_position ref:IFOPT=A gtfs:feed=A"; 176 } 177 178 /* route_master and route relations */ 172 179 relation["public_transport:version"=2].PtRoute[!gtfs:shape_id][!gtfs:trip_id][!gtfs:trip_id:sample], 173 180 relation[gtfs:route_id].PtRouteMaster[!gtfs:feed][!network:guid][!operator:guid], … … 179 186 group: tr("Public Transport GTFS: missing tag"); 180 187 assertMatch: "relation type=route_master route_master=train gtfs:route_id=0-7-242-19j-1"; 188 assertNoMatch: "relation type=route_master route_master=train gtfs:route_id=0-7-242-19j-1 network:guid=DE-BY-MVV"; 181 189 assertMatch: "relation type=route route=bus gtfs:shape_id=0-7-242-19j-1.26.R"; 182 assertNoMatch: "relation type=route_master route_master=train gtfs:route_id=0-7-242-19j-1 network:guid=DE-BY-MVV"; 183 assertNoMatch: "relation type=route_master route=bus colour=green"; 190 assertNoMatch: "relation type=route_master route=bus"; 184 191 } 185 192 … … 360 367 relation.PtRoute[network ][!network:short][network =~ /^[A-Z0-9]+$/] { 361 368 throwWarning: tr(" `{0}` looks like an abbreviation", "{1.tag}"); 362 group: tr("Public Transport GTFS: value syntax");369 group: tr("Public Transport GTFS: abbreviation as value"); 363 370 suggestAlternative: "`network:short=*` and a longer form for `network=*`"; 364 371 fixChangeKey: "network=>network:short"; … … 373 380 relation.PtRoute[operator ][!operator:short][operator =~ /^[A-Z0-9]+$/] { 374 381 throwWarning: tr(" `{0}` looks like an abbreviation", "{1.tag}"); 375 group: tr("Public Transport GTFS: value syntax");382 group: tr("Public Transport GTFS: abbreviation as value"); 376 383 suggestAlternative: "`operator:short=*` and a longer form for `operator=*`"; 377 384 fixChangeKey: "operator=>operator:short"; … … 379 386 assertNoMatch: "relation public_transport=stop_area operator=AA0AA operator:short=A"; 380 387 assertNoMatch: "relation public_transport=stop_area operator=Anna"; 388 } 389 390 /* Permanet links to PTNA GTFS */ 391 /* *[JOSM_search("ptna.openstreetmap.de/gtfs")][!JOSM_search("^.*network=([a-zA-Z]+[-]){2,}\\d{4}(-\\d\\d){2}.*$")] { */ 392 *[url =~ /^.*ptna\.openstreetmap\.de\/gtfs.+$/][url !~ /^.*network=([a-zA-Z]+[-]){2,}\d{4}(-\d\d){2}.*$/], 393 *[website =~ /^.*ptna\.openstreetmap\.de\/gtfs.+$/][website !~ /^.*network=([a-zA-Z]+[-]){2,}\d{4}(-\d\d){2}.*$/], 394 *[source =~ /^.*ptna\.openstreetmap\.de\/gtfs.+$/][source !~ /^.*network=([a-zA-Z]+[-]){2,}\d{4}(-\d\d){2}.*$/] { 395 throwWarning: tr("Relative GTFS url in `{0}=*`. Add the `source_date` behind the network value with a minus `-` as separator.", "{0.key}"); 396 assertMatch: "node source=\"https://ptna.openstreetmap.de/gtfs/19\""; 397 assertNoMatch: "node source=\"https://ptna.openstreetmap.de/gtfs/DE/trips.php?network=DE-BW-VAG-2020-07-28&route_id=10-10-I-j20-1\""; 381 398 } 382 399
