Skip to content

Commit

Permalink
move line comments to separate lines
Browse files Browse the repository at this point in the history
  • Loading branch information
miklcct committed Sep 25, 2024
1 parent ec4051f commit ee281bc
Showing 1 changed file with 29 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,61 @@ public static TransitMode mapMode(int routeType) {
}

/* TPEG Extension https://groups.google.com/d/msg/gtfs-changes/keT5rTPS7Y0/71uMz2l6ke0J */
if (routeType >= 100 && routeType < 200) { // Railway Service
if (routeType >= 100 && routeType < 200) {
// Railway Service
return TransitMode.RAIL;
} else if (routeType >= 200 && routeType < 300) { //Coach Service
} else if (routeType >= 200 && routeType < 300) {
// Coach Service
return TransitMode.COACH;
} else if (routeType >= 300 && routeType < 500) { //Suburban Railway Service and Urban Railway service
} else if (routeType >= 300 && routeType < 500) {
// Suburban Railway Service and Urban Railway service
if (routeType >= 401 && routeType <= 402) {
return TransitMode.SUBWAY;
}
if (routeType == 405) {
return TransitMode.MONORAIL;
}
return TransitMode.RAIL;
} else if (routeType >= 500 && routeType < 700) { //Metro Service and Underground Service
} else if (routeType >= 500 && routeType < 700) {
// Metro Service and Underground Service
return TransitMode.SUBWAY;
} else if (routeType >= 700 && routeType < 800) { //Bus Service
} else if (routeType >= 700 && routeType < 800) {
// Bus Service
return TransitMode.BUS;
} else if (routeType >= 800 && routeType < 900) { //Trolleybus Service
} else if (routeType >= 800 && routeType < 900) {
// Trolleybus Service
return TransitMode.TROLLEYBUS;
} else if (routeType >= 900 && routeType < 1000) { //Tram service
} else if (routeType >= 900 && routeType < 1000) {
// Tram service
return TransitMode.TRAM;
} else if (routeType >= 1000 && routeType < 1100) { //Water Transport Service
} else if (routeType >= 1000 && routeType < 1100) {
// Water Transport Service
return TransitMode.FERRY;
} else if (routeType >= 1100 && routeType < 1200) { //Air Service
} else if (routeType >= 1100 && routeType < 1200) {
// Air Service
return TransitMode.AIRPLANE;
} else if (routeType >= 1200 && routeType < 1300) { //Ferry Service
} else if (routeType >= 1200 && routeType < 1300) {
// Ferry Service
return TransitMode.FERRY;
} else if (routeType >= 1300 && routeType < 1400) { //Telecabin Service
} else if (routeType >= 1300 && routeType < 1400) {
// Telecabin Service
return TransitMode.GONDOLA;
} else if (routeType >= 1400 && routeType < 1500) { //Funicular Service
} else if (routeType >= 1400 && routeType < 1500) {
// Funicular Service
return TransitMode.FUNICULAR;
} else if (routeType >= 1551 && routeType < 1561) {
// Carpooling, not defined anywhere, so we've chosen this number space
// see https://groups.google.com/g/gtfs-changes/c/keT5rTPS7Y0/m/71uMz2l6ke0J for an effort to
// standardise
return TransitMode.CARPOOL;
} else if (routeType >= 1500 && routeType < 1599) {
//Taxi Service
// Taxi Service
return TransitMode.TAXI;
} else if (routeType >= 1600 && routeType < 1700) { //Self drive
} else if (routeType >= 1600 && routeType < 1700) {
// Self drive
return TransitMode.BUS;
} else if (routeType >= 1700 && routeType < 1800) { //Miscellaneous Service
} else if (routeType >= 1700 && routeType < 1800) {
// Miscellaneous Service
return null;
}
/* Original GTFS route types. Should these be checked before TPEG types? */
Expand Down

0 comments on commit ee281bc

Please sign in to comment.