Changes between Version 24 and Version 25 of Rules/PublicTransportGtfs


Ignore:
Timestamp:
2020-08-31T14:34:07+02:00 (6 years ago)
Author:
skyper
Comment:

replace "gtfs:source_date" with "gtfs:release_date"

Legend:

Unmodified
Added
Removed
Modified
  • Rules/PublicTransportGtfs

    v24 v25  
    2828* [osmwiki:Proposed_features/Key:gtfs:trip_id gtfs:trip_id]
    2929* [osmwiki:Proposed_features/Key:gtfs:trip_id:sample gtfs:trip_id:sample]
    30 * [osmwiki:Proposed_features/Key:gtfs:source_date gtfs:source_date]
     30* ~~[osmwiki:Proposed_features/Key:gtfs:source_date gtfs:source_date]~~ replace by `gtfs:release_date`
     31* [osmwiki:Proposed_features/Key:gtfs:release_date gtfs:release_date]
    3132* [osmwiki:Key:gtfs:stop_id gtfs:stop_id]
    3233* [osmwiki:Key:interval interval]
     
    226227/* One of many {0.key} but no {1.key} */
    227228
    228 /* gtfs:source_date */
    229 *[/(^gtfs:|:gtfs|^ref:IFOPT)/][!gtfs:source_date] {
     229/* gtfs:release_date */
     230*[/(^gtfs:|:gtfs|^ref:IFOPT)/][!gtfs:release_date] {
    230231  throwWarning: tr("GTFS tag without `{0}*`.", "{1.tag}");
    231232  group: tr("Public Transport GTFS: missing tag");
     
    233234  assertMatch:   "node note:gtfs=A";
    234235  assertMatch:   "node ref:IFOPT=1";
    235   assertNoMatch: "node ref:IFOPT=1 gtfs:source_date=2019";
     236  assertNoMatch: "node ref:IFOPT=1 gtfs:release_date=2019";
    236237}
    237238
     
    264265  assertNoMatch: "relation gtfs:trip_id=2.TA.90-742-B-j20-1.4.R";
    265266}
    266 /* gtfs:feed, *:guid, gtfs:source_date */
     267/* gtfs:feed, *:guid, gtfs:release_date */
    267268/* FIXME: Get proper list of valid values. */
    268269/* FIXME: Get proper syntax as regex displayed. */
     
    270271*[network:guid ][network:guid  !~ /^(([A-Z]{2}-){2}[a-zA-Z]{2}.*|[A-Z]{2}-Flixbus|BO-C-Cochabamba|(CH|LU)-[a-zA-Z]{3,}|CO-BOY-[A-Z].+|ES-AR-Z-[A-Z].+|FR-IDF-(r|[a-zA-Z]{3,}.*)|MG-T-Antananarivo)$/],
    271272*[operator:guid][operator:guid !~ /^(([A-Z]{2}-){2}[a-zA-Z]{2}.*|[A-Z]{2}-Flixbus|BO-C-Cochabamba|(CH|LU)-[a-zA-Z]{3,}|CO-BOY-[A-Z].+|ES-AR-Z-[A-Z].+|FR-IDF-(r|[a-zA-Z]{3,}.*)|MG-T-Antananarivo)$/],
    272 *[gtfs:source_date][gtfs:source_date !~ /^20(1[7-9]|20)-(0[1-9]|1[0-2])-(3[01]|[12][0-9]|0[1-9])$/] {
     273*[gtfs:release_date][gtfs:release_date !~ /^20(1[7-9]|20)-(0[1-9]|1[0-2])-(3[01]|[12][0-9]|0[1-9])$/] {
    273274  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax.", "{0.value}", "{0.key}");
    274275/*  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax `{2}`.", "{0.value}", "{0.key}", "{1.value}"); */
     
    280281  assertNoMatch: "relation gtfs:feed=AU-SA-Adelaide-Metro";
    281282  assertNoMatch: "relation gtfs:feed=DE-SL-saarVV";
    282   assertMatch:   "relation gtfs:source_date=2016-09-30";
    283   assertMatch:   "relation gtfs:source_date=2020-9-3";
    284   assertMatch:   "relation gtfs:source_date=2016-09-30";
    285   assertNoMatch: "relation gtfs:source_date=2020-09-30";
     283  assertMatch:   "relation gtfs:release_date=2016-09-30";
     284  assertMatch:   "relation gtfs:release_date=2020-9-3";
     285  assertMatch:   "relation gtfs:release_date=2016-09-30";
     286  assertNoMatch: "relation gtfs:release_date=2020-09-30";
    286287}
    287288/* ref:IFOPT, gtfs:stop_id */
     
    393394*[website =~ /^.*ptna\.openstreetmap\.de\/gtfs.+$/][website !~ /^.*network=([a-zA-Z]+[-]){2,}\d{4}(-\d\d){2}.*$/],
    394395*[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  throwWarning: tr("Relative GTFS url in `{0}=*`. Add the `release_date` behind the network value with a minus `-` as separator.", "{0.key}");
    396397  assertMatch:   "node source=\"https://ptna.openstreetmap.de/gtfs/19\"";
    397398  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\"";