Changes between Version 16 and Version 17 of Rules/PublicTransportGtfs


Ignore:
Timestamp:
2020-07-27T21:30:39+02:00 (6 years ago)
Author:
skyper
Comment:

update of shape_id syntax

Legend:

Unmodified
Added
Removed
Modified
  • Rules/PublicTransportGtfs

    v16 v17  
    214214/* route_id, shape_id, trip_id */
    215215/* FIXME: Get proper syntax as regex displayed. */
    216 *[gtfs:route_id      ][gtfs:route_id       !~                           /^[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?(;[ ]?[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?)*$/],
    217 *[gtfs:shape_id      ][gtfs:shape_id       !~                           /^[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]?\.[HR](;[ ]?[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]?\.[HR])*$/],
    218 *[gtfs:trip_id       ][gtfs:trip_id        !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]?\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]?\.[HR])*$/],
    219 *[gtfs:trip_id:sample][gtfs:trip_id:sample !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]?\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[1-9][0-9]{0,2}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]?\.[HR])*$/] {
     216*[gtfs:route_id      ][gtfs:route_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?(;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?)*$/],
     217*[gtfs:shape_id      ][gtfs:shape_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR](;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR])*$/],
     218*[gtfs:trip_id       ][gtfs:trip_id        !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR])*$/],
     219*[gtfs:trip_id:sample][gtfs:trip_id:sample !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR])*$/] {
    220220  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax.", "{0.value}", "{0.key}");
    221221/*  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax `{2}`.", "{0.value}", "{0.key}", "{1.value}"); */
     
    229229  assertMatch:   "relation gtfs:shape_id=11-4-I-j20-1.23.";
    230230  assertNoMatch: "relation gtfs:shape_id=11-4-I-j20-1.23.H";
    231   assertNoMatch: "relation gtfs:shape_id=7-342-j1j-1.51.R";
     231  assertNoMatch: "relation gtfs:shape_id=92-R01-F-j20-1.117.R";
    232232  assertNoMatch: "relation gtfs:shape_id=0-S3-E-j20-2.1.R";
    233233  assertMatch:   "relation gtfs:trip_id=1108.T2.11-4-I-j20-1.10.";