Changes between Version 3 and Version 4 of Rules/PublicTransportGtfs


Ignore:
Timestamp:
2020-07-14T02:55:30+02:00 (6 years ago)
Author:
skyper
Comment:

add one more rule and link to meta

Legend:

Unmodified
Added
Removed
Modified
  • Rules/PublicTransportGtfs

    v3 v4  
    3232{
    3333  title: "Public Transport GTFS";
    34   version: "0.0.[[revision]]_[[date]]";
     34  link: "https://josm.openstreetmap.de/wiki/Rules/PublicTransportGtfs";
    3535  description: "Special rules for Public transportation supporting GTFS and tags for PTNA";
    3636  author: "skyper";
    3737  baselanguage: "en";
    3838  watch-modified: true;
     39  version: "0.0.[[revision]]_[[date]]";
    3940  min-josm-version: 14481;
    4041}
     
    8586  assertNoMatch: "node gtfs:stop_id=ch:3001:64883";
    8687}
     88
     89
     90/*  ----------------
     91 *  conflicting tags
     92 */
     93
     94/* route_id, shape_id, trip_id */
     95*[gtfs:route_id][gtfs:shape_id][!(tag("gtfs:route_id") == get(regexp_match("^(.+)\\.[1-9][0-9]?\\.[HR]$", tag("gtfs:shape_id"), "d"), 1))],
     96*[gtfs:route_id][gtfs:trip_id][!(tag("gtfs:route_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)\\.[1-9][0-9]?\\.[HR]$", tag("gtfs:trip_id")), 1))],
     97*[gtfs:route_id][gtfs:trip_id:sample][!(tag("gtfs:route_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)\\.[1-9][0-9]?\\.[HR]$", tag("gtfs:trip_id:sample")), 1))] {
     98  throwError: tr("`{1}` is not a substring of `{0}`", "{0.tag}", "{1.tag}");
     99  group: tr("Public Transport GTFS");
     100  assertMatch:   "relation gtfs:route_id=7-342-j1j-1 gtfs:shape_id=7-342-j1j-1";
     101  assertMatch:   "relation gtfs:route_id=7-342-j1j-1 gtfs:shape_id=7-352-j1j-1.17.H";
     102  assertMatch:   "relation gtfs:route_id=7-342-j1j-1 gtfs:shape_id=T7-342-j1j-1.17.H";
     103  assertNoMatch: "relation gtfs:route_id=7-342-j1j-1 gtfs:shape_id=7-342-j1j-1.17.H";
     104  assertMatch:   "relation gtfs:route_id=11-4-I-j20-1 gtfs:trip_id=1108.T2.11-4-I-j20-1.10.";
     105  assertMatch:   "relation gtfs:route_id=11-4-I-j20-1 gtfs:trip_id=1108.T2.11-5-I-j20-1.10.H";
     106  assertMatch:   "relation gtfs:route_id=11-4-I-j20-1 gtfs:trip_id=1108.TB2.11-5-I-j20-1.10.H";
     107  assertNoMatch: "relation gtfs:route_id=11-4-I-j20-1 gtfs:trip_id=1108.T2.11-4-I-j20-1.10.H";
     108}