Skip to content

Commit

Permalink
Merge pull request #168 from iRail/feature/taf-tap-numbers
Browse files Browse the repository at this point in the history
Add TSI TAF/TAP identifiers to the dataset
  • Loading branch information
Bertware authored Feb 13, 2024
2 parents 51cd7b8 + 6229dfe commit 72d1844
Show file tree
Hide file tree
Showing 6 changed files with 793 additions and 758 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This file describes all NMBS/SNCB stations in Belgium. A station can have multip
* `alternative-nl`: alt. name in Dutch, if available
* `alternative-de`: alt. name in German, if available
* `alternative-en`: alt. name in English, if available
* `taf-tap-code`: [TSI TAF/TAP](https://mobilit.belgium.be/en/rail/professional-railway-transport/taf-tap) number for the station Source: [Infrabel Operational point of the railway network ](https://opendata.infrabel.be/explore/dataset/operationele-punten-van-het-netwerk/table/?sort=ptcarid).
* `telegraph-code`: abbreviated name for Belgian stations, used by NMBS/SNCB internally. Source: [Infrabel Network Statement](https://infrabel.be/en/networkstatement), [attachment D](https://infrabel.be/sites/default/files/generated/files/paragraph/NV_BijlagenD_RIEI_26.zip) file _D06-RIEI-12_N_20230915.pdf_.
* `country-code`: the code of the country the station belongs to
* `avg_stop_times`: the average number of vehicles stopping each day in this station (_computed field_)
Expand Down
18 changes: 16 additions & 2 deletions bin/gtfs_data_extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,28 @@
const CSV_HEADER_ALT_NL = 'alternative-nl';
const CSV_HEADER_ALT_DE = 'alternative-de';
const CSV_HEADER_ALT_EN = 'alternative-en';
const CSV_HEADER_TAF_TAP = 'taf-tap-code';
const CSV_HEADER_TELEGRAPH_CODE = 'telegraph-code';
const CSV_HEADER_LONGITUDE = 'longitude';
const CSV_HEADER_LATITUDE = 'latitude';
const CSV_HEADER_AVG_STOP_TIMES = 'avg_stop_times';
const CSV_HEADER_TRANSFER_TIME = 'official_transfer_time';

const CSV_WRITE_HEADERS = [CSV_HEADER_URI, CSV_HEADER_NAME, CSV_HEADER_ALT_FR, CSV_HEADER_ALT_NL, CSV_HEADER_ALT_DE, CSV_HEADER_ALT_EN, CSV_HEADER_TELEGRAPH_CODE,
CSV_HEADER_COUNTRY, CSV_HEADER_LONGITUDE, CSV_HEADER_LATITUDE, CSV_HEADER_AVG_STOP_TIMES, CSV_HEADER_TRANSFER_TIME];
const CSV_WRITE_HEADERS = [
CSV_HEADER_URI,
CSV_HEADER_NAME,
CSV_HEADER_ALT_FR,
CSV_HEADER_ALT_NL,
CSV_HEADER_ALT_DE,
CSV_HEADER_ALT_EN,
CSV_HEADER_TAF_TAP,
CSV_HEADER_TELEGRAPH_CODE,
CSV_HEADER_COUNTRY,
CSV_HEADER_LONGITUDE,
CSV_HEADER_LATITUDE,
CSV_HEADER_AVG_STOP_TIMES,
CSV_HEADER_TRANSFER_TIME
];


const IRAIL_STATION_BASE_URI = "http://irail.be/stations/NMBS/00";
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
},
"require-dev" : {
"ext-zip": "*",
"phpunit/phpunit": "^5.5"
"phpunit/phpunit": "^9.6.16"
}
}
Loading

0 comments on commit 72d1844

Please sign in to comment.