Module:Adjacent stations/Metro Trains Melbourne
Appearance
This is a data module for Module:Adjacent stations. It supports services operated by Metro Trains Melbourne.
PTV metropolitan train lines
| Line | Keys | Color | Hex color | Icon |
|---|---|---|---|---|
| Alamein line | Alamein |
152c6b |
| |
| Belgrave line | Belgrave |
152c6b |
| |
| Craigieburn line | Craigieburn |
ffbe00 |
| |
| Cranbourne line | Cranbourne |
279fd5 |
| |
| Flemington Racecourse line | Flemington Racecourse or Flemington |
95979a |
| |
| Frankston line | Frankston |
028430 |
| |
| Glen Waverley line | Glen Waverley |
152c6b |
| |
| Hurstbridge line | Hurstbridge |
be1014 |
| |
| Lilydale line | Lilydale |
152c6b |
| |
| Mernda line | Mernda |
be1014 |
| |
| Pakenham line | Pakenham |
279fd5 |
| |
| Sandringham line | Sandringham |
f178af |
| |
| Stony Point line | Stony Point |
028430 |
| |
| Sunbury line | Sunbury |
ffbe00 |
| |
| Upfield line | Upfield |
ffbe00 |
| |
| Werribee line | Werribee |
028430 |
| |
| Williamstown line | Williamstown |
028430 |
|
Planning or under construction lines
| Line | Keys | Color | Hex color | Icon |
|---|---|---|---|---|
| Airport (under construction) | Airport or Melbourne Airport |
F95602 |
| |
| Cranbourne, Pakenham and Sunbury (under construction) | Metro Tunnel |
279fd5 |
| |
| Suburban Rail Loop (under construction) | Suburban Rail Loop |
008746 |
|
V/Line services in metropolitan Melbourne
| Line | Keys | Color | Hex color | Icon |
|---|---|---|---|---|
| V/Line | V/Line |
8f1a95 |
|
local melbourne = "%1 railway station, Melbourne"
local victoria = "%1 railway station, Victoria"
local s = "background-color: white; font-size: 160%; color: black; font-family:sans-serif; text-align:center; padding: 0.4em; padding-top: calc(0.4em + 7px); white-space: nowrap; margin: 0.25em;"
local sb = "background-color: white; border-top: 7px solid #%s; font-size: 160%%; color: black; font-family:sans-serif; text-align:center; padding: 0.4em; white-space: nowrap; margin: 0.25em;"
local c = {
Airport = 'F95602',
Alamein = '152C6B',
Belgrave = '152C6B',
Craigieburn = 'FFBE00',
Cranbourne = '279FD5',
CranbournePakenhamSunbury = '279FD5',
Flemington = '95979A',
Frankston = '028430',
GlenWaverley = '152C6B',
Hurstbridge = 'BE1014',
Lilydale = '152C6B',
Mernda = 'BE1014',
Pakenham = '279FD5',
Sandringham = 'F178AF',
Sunbury = 'FFBE00',
Upfield = 'FFBE00',
Werribee = '028430',
Williamstown = '028430',
VLine = '8F1A95',
sys = '0072CE',
blk = '000000',
wht = 'ffffff'
}
-- Draw top colour bar
local function topBars(barTable)
local segments = {}
local pos = 0
for _, t in ipairs(barTable) do
local colour, width = t[1], t[2]
local start = pos
local stop = pos + width
table.insert(segments, "#" .. colour .. " " .. start .. "% " .. stop .. "%")
pos = stop
end
return "background-image:linear-gradient(to right," ..
table.concat(segments, ",") ..
"); background-size:100% 7px; background-position:top; background-repeat:no-repeat; background-origin:border-box;"
end
local p = {
["system title"] = "[[Metro Trains Melbourne|Metro Trains]]",
["system icon"] = "[[File:Melbourne_train_logo.svg|18px|link=Railways in Melbourne|alt=Railways in Melbourne]]",
["system color"] = "0072ce",
["name format"] = {
"background-color: #0072CE; font-size: 160%; color: white; font-family:sans-serif; text-align:center; padding: 0.4em; white-space: nowrap; margin: 0.25em;",
["Airport"] = string.format(sb, c.Airport),
["Alamein"] = string.format(sb, c.Alamein),
["Belgrave"] = string.format(sb, c.Belgrave),
["Craigieburn"] = string.format(sb, c.Lilydale),
["Cranbourne"] = string.format(sb, c.Cranbourne),
["Frankston"] = string.format(sb, c.Frankston),
["Flemington"] = string.format(sb, c.Flemington),
["Glen Waverley"] = string.format(sb, c.GlenWaverley),
["Hurstbridge"] = string.format(sb, c.Hurstbridge),
["Lilydale"] = string.format(sb, c.Lilydale),
["Mernda"] = string.format(sb, c.Mernda),
["Pakenham"] = string.format(sb, c.Pakenham),
["Sandringham"] = string.format(sb, c.Sandringham),
["Sunbury"] = string.format(sb, c.Sunbury),
["Upfield"] = string.format(sb, c.Upfield),
["Werribee"] = string.format(sb, c.Werribee),
["Williamstown"] = string.format(sb, c.Williamstown),
["City Loop station"] =
topBars({
{c.Mernda, 25},
{c.Pakenham, 25},
{c.Craigieburn, 25},
{c.Lilydale, 25},
}) .. s,
["City Loop station future"] =
topBars({
{c.Mernda, 25},
{c.Frankston, 25},
{c.Craigieburn, 25},
{c.Lilydale, 25},
}) .. s,
["Craigieburn, Werribee, V/Line"] =
topBars({
{c.Craigieburn, 33.333},
{c.Werribee, 33.333},
{c.VLine, 33.333},
}) .. s,
["Craigieburn, V/Line"] =
topBars({
{c.Craigieburn, 50},
{c.VLine, 50},
}) .. s,
["Mernda, Lilydale, Craigieburn, Flemington, Pakenham, Frankston, Sandringham, V/Line"] =
topBars({
{c.Mernda, 12.5},
{c.Lilydale, 12.5},
{c.Craigieburn, 12.5},
{c.Flemington, 12.5},
{c.Pakenham, 12.5},
{c.Frankston, 12.5},
{c.Sandringham, 12.5},
{c.VLine, 12.5},
}) .. s,
["Lilydale, Pakenham, Frankston, Sandringham, V/Line"] =
topBars({
{c.Lilydale, 20},
{c.Pakenham, 20},
{c.Frankston, 20},
{c.Sandringham, 20},
{c.VLine, 20},
}) .. s,
["Pakenham, Frankston"] =
topBars({
{c.Pakenham, 50},
{c.Frankston, 50},
}) .. s,
["Pakenham, Frankston, Sandringham"] =
topBars({
{c.Pakenham, 33.333},
{c.Frankston, 33.333},
{c.Sandringham, 33.333},
}) .. s,
["Pakenham, Frankston, V/Line"] =
topBars({
{c.Pakenham, 33.333},
{c.Frankston, 33.333},
{c.VLine, 33.333},
}) .. s,
["Pakenham, V/Line"] =
topBars({
{c.Pakenham, 50},
{c.VLine, 50},
}) .. s,
["Sunbury, V/Line"] =
topBars({
{c.Sunbury, 50},
{c.VLine, 50},
}) .. s,
["Sunbury, Pakenham"] =
topBars({
{c.Sunbury, 50},
{c.Pakenham, 50},
}) .. s,
["Sunbury, Werribee, V/Line"] =
topBars({
{c.Sunbury, 33.333},
{c.Werribee, 33.333},
{c.VLine, 33.333},
}) .. s,
["Sunbury, Pakenham, Werribee, V/Line"] =
topBars({
{c.Sunbury, 25},
{c.Pakenham, 25},
{c.Werribee, 25},
{c.VLine, 25},
}) .. s,
},
["header background color"] = "E4E4E4",
["header text color"] = "000000",
["station format"] = {
"%1 railway station",
["City Loop"] = "[[City Loop]]",
["FS or P"] = "[[Flinders Street railway station|Flinders Street]] or [[Parliament railway station|Parliament]]",
["SC or F"] = "[[Southern Cross railway station|Southern Cross]] or [[Flagstaff railway station|Flagstaff]]",
["SC or J"] = "[[Southern Cross railway station|Southern Cross]] or [[Jolimont railway station|Jolimont]]",
["SC or P"] = "[[Southern Cross railway station|Southern Cross]] or [[Parliament railway station|Parliament]]",
["SC or R"] = "[[Southern Cross railway station|Southern Cross]] or [[Richmond railway station, Melbourne|Richmond]]",
["G or S"] = "[[Ginifer railway station|Ginifer]] or [[Sunshine railway station, Melbourne|Sunshine]]",
["A or SA"] = "[[Albion railway station, Melbourne|Albion]] or [[St Albans railway station, Melbourne|St Albans]]",
["T or F"] = "[[Tottenham railway station|Tottenham]] or [[Footscray railway station|Footscray]]",
["MF or S"] = "[[Middle Footscray railway station|Middle Footscray]] or [[Sunshine railway station, Melbourne|Sunshine]]",
["L or B"] = "[[Laburnam railway station|Laburnam]] or [[Blackburn railway station, Melbourne|Blackburn]]",
["N or M"] = "[[Nunawading railway station|Nunawading]] or [[Mitcham railway station, Melbourne|Mitcham]]",
["H or R"] = "[[Heatherdale railway station|Heatherdale]] or [[Ringwood railway station, Melbourne|Ringwood]]",
["H or M"] = "[[Heatherdale railway station|Heatherdale]] or [[Mitcham railway station, Melbourne|Mitcham]]",
["N or B"] = "[[Nunawading railway station|Nunawading]] or [[Blackburn railway station, Melbourne|Blackburn]]",
["L or BH"] = "[[Laburnam railway station|Laburnam]] or [[Box Hill railway station, Melbourne|Box Hill]]",
["G or R"] = "[[Glenferrie railway station|Glenferrie]] or [[Richmond railway station, Melbourne|Richmond]]",
["G or C"] = "[[Glenferrie railway station|Glenferrie]] or [[Camberwell railway station, Melbourne|Camberwell]]",
["M or C"] = "[[Malvern railway station, Melbourne|Malvern]] or [[Caulfield railway station|Caulfield]]",
["M or SY"] = "[[Malvern railway station, Melbourne|Malvern]] or [[South Yarra railway station|South Yarra]]",
["S or N"] = "[[Seddon railway station|Seddon]] or [[Newport railway station, Melbourne|Newport]]",
["S or F"] = "[[Spotswood railway station|Spotswood]] or [[Footsray railway station|Footscray]]",
["SK or F"] = "[[South Kensington railway station, Melbourne|South Kensington]] or [[Footscray railway station|Footscray]]",
["K or E"] = "[[Kensington railway station, Melbourne|Kensington]] or [[Essendon railway station|Essendon]]",
["S or L"] = "[[Seaholme railway station|Seaholme]] or [[Laverton railway station|Laverton]]",
["W or N"] = "[[Westona railway station|Westona]] or [[Newport railway station, Melbourne|Newport]]",
["A or W"] = "[[Aircraft railway station|Aircraft]] or [[Werribee railway station|Werribee]]",
["HC or L"] = "[[Hoppers Crossing railway station|Hoppers Crossing]] or [[Laverton railway station, Melbourne|Laverton]]",
["WR or VP"] = "[[West Richmond railway station|West Richmond]] or [[Victoria Park railway station, Melbourne|Victoria Park]]",
["CO or JO"] = "[[Collingwood railway station|Collingwood]] or [[Jolimont railway station, Melbourne|Jolimont]]",
["M or NM"] = "[[Moonee Ponds railway station|Moonee Ponds]] or [[North Melbourne railway station|North Melbourne]]",
["ER or B"] = "[[East Richmond railway station, Melbourne|East Richmond]] or [[Burnley railway station|Burnley]]",
["ER or R"] = "[[East Richmond railway station, Melbourne|East Richmond]] or [[Richmond railway station, Melbourne|Richmond]]",
["F via FS"] = "[[Frankston railway station|Frankston]] via [[Flinders Street railway station|Flinders Street]]",
["S via FS"] = "[[Sandringham railway station|Sandringham]] via [[Flinders Street railway station|Flinders Street]]",
["W via FS"] = "[[Werribee railway station|Werribee]] or [[Williamstown railway station|Williamstown]] via [[Flinders Street railway station|Flinders Street]]",
["EC via TH"] = "[[East Pakenham railway station|East Pakenham]] or [[Cranbourne railway station|Cranbourne]] via [[Town Hall railway station, Melbourne|Town Hall]]",
["S via TH"] = "[[Watergardens railway station|Watergardens]] or [[Sunbury railway station, Melbourne|Sunbury]] via [[Town Hall railway station, Melbourne|Town Hall]]",
["FS via CL"] = "[[Flinders Street railway station|Flinders Street]] via [[City Loop]]",
["Albion"] = melbourne,
["Armadale"] = melbourne,
["Arden"] = melbourne,
["Ashburton"] = melbourne,
["Auburn"] = melbourne,
["Balaclava"] = melbourne,
["Bayswater"] = melbourne,
["Beaconsfield"] = melbourne,
["Bell"] = melbourne,
["Berwick"] = melbourne,
["Blackburn"] = melbourne,
["Box Hill"] = melbourne,
["Broadmeadows"] = melbourne,
["Brunswick"] = melbourne,
["Burwood"] = melbourne,
["Burwood (SRL)"] = "Burwood SRL station",
["Camberwell"] = melbourne,
["Canterbury"] = melbourne,
["Chatham"] = melbourne,
["Chelsea"] = melbourne,
["Cheltenham"] = melbourne,
["Clayton"] = melbourne,
["Clyde"] = victoria,
["Croydon"] = melbourne,
["East Richmond"] = melbourne,
["Eltham"] = melbourne,
["Epping"] = melbourne,
["Fairfield"] = melbourne,
["Hampton"] = melbourne,
["Hastings"] = melbourne,
["Hawthorn"] = melbourne,
["Ivanhoe"] = melbourne,
["Kensington"] = melbourne,
["Laverton"] = melbourne,
["Malvern"] = melbourne,
["Melton"] = melbourne,
["Mitcham"] = melbourne,
["Montmorency"] = melbourne,
["Newmarket"] = melbourne,
["Newport"] = melbourne,
["Oak Park"] = melbourne,
["Paisley"] = melbourne,
["Preston"] = melbourne,
["Richmond"] = melbourne,
["Ringwood"] = melbourne,
["Sandown Park"] = melbourne,
["Seaford"] = melbourne,
["Showgrounds"] = melbourne,
["St Albans"] = melbourne,
["Sunbury"] = melbourne,
["Sunshine"] = melbourne,
["Thomastown"] = melbourne,
["Thornbury"] = melbourne,
["Town Hall"] = melbourne,
["Union"] = melbourne,
["Upwey"] = melbourne,
["Victoria Park"] = melbourne,
["Windsor"] = melbourne,
},
["lines"] = {
["City Circle"] = {
["title"] = "[[City Loop|City Circle]]",
["color"] = "000000",
["left terminus"] = "",
["right terminus"] = "",
["circular"] = true
},
["Cranbourne, Pakenham and Sunbury"] = {
["title"] = "[[Metro Tunnel|Cranbourne, Pakenham and Sunbury line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "Sunbury",
["right terminus"] = {"East Pakenham", "Cranbourne"}
},
["Alamein"] = {
["title"] = "[[Alamein line]]",
["color"] = "152c6b",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = "Alamein"
},
["Belgrave"] = {
["title"] = "[[Belgrave line]]",
["color"] = "152c6b",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = "Belgrave"
},
["Craigieburn"] = {
["title"] = "[[Craigieburn line]]",
["color"] = "ffbe00",
["left terminus"] = "Flinders Street",
["right terminus"] = "Craigieburn"
},
["Cranbourne"] = {
["title"] = "[[Cranbourne line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "FS via CL",
["right terminus"] = "Cranbourne"
},
["CranbourneC"] = {
["title"] = "[[Cranbourne line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "FS via CL",
["right terminus"] = "Cranbourne"
},
["CranbourneM"] = {
["title"] = "[[Cranbourne line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "S via TH",
["right terminus"] = "Cranbourne"
},
["Flemington Racecourse"] = {
["title"] = "[[Flemington Racecourse line]]",
["color"] = "95979a",
["text color"] = "FFFFFF",
["left terminus"] = {"Southern Cross", "Flinders Street"},
["right terminus"] = {"Showgrounds", "Flemington Racecourse"},
},
["Frankston"] = {
["title"] = "[[Frankston line]]",
["color"] = "028430",
["text color"] = "FFFFFF",
["left terminus"] = "W via FS",
["right terminus"] = {"Cheltenham", "Frankston"},
},
["FrankstonC"] = {
["title"] = "[[Frankston line]]",
["color"] = "028430",
["text color"] = "FFFFFF",
["left terminus"] = "FS via CL",
["right terminus"] = "Frankston"
},
["Glen Waverley"] = {
["title"] = "[[Glen Waverley line]]",
["color"] = "152c6b",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = "Glen Waverley"
},
["Hurstbridge"] = {
["title"] = "[[Hurstbridge line]]",
["color"] = "be1014",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = {"Eltham", "Hurstbridge"},
},
["Lilydale"] = {
["title"] = "[[Lilydale line]]",
["color"] = "152c6b",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = "Lilydale"
},
["Mernda"] = {
["title"] = "[[Mernda line]]",
["color"] = "be1014",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = "Mernda"
},
["Melbourne Airport"] = {
["title"] = "[[Melbourne Airport Rail|Airport]]<br />(under construction)",
["color"] = "F95602",
["text color"] = "FFFFFF",
["left terminus"] = {"Pakenham", "Cranbourne"},
["right terminus"] = "[[Melbourne Airport railway station|Melbourne Airport]]"
},
["Melton"] = {
["title"] = "[[Ballarat Line|Melton Line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = {"EC via TH"},
["right terminus"] = "[[Melton]]"
},
["Metro Tunnel"] = {
["title"] = "[[Metro Tunnel|Cranbourne, Pakenham and Sunbury]]<br />(under construction)",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "Sunbury",
["right terminus"] = {"East Pakenham", "Cranbourne"}
},
["Pakenham"] = {
["title"] = "[[Pakenham line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "FS via CL",
["right terminus"] = "East Pakenham"
},
["PakenhamC"] = {
["title"] = "[[Pakenham line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "FS via CL",
["right terminus"] = "East Pakenham"
},
["PakenhamM"] = {
["title"] = "[[Pakenham line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "S via TH",
["right terminus"] = "East Pakenham"
},
["Sandringham"] = {
["title"] = "[[Sandringham line]]",
["color"] = "f178af",
["text color"] = "FFFFFF",
["left terminus"] = "Flinders Street",
["right terminus"] = "Sandringham"
},
["Sandr|ngham"] = {
["title"] = "[[Sandringham line]]",
["color"] = "f178af",
["text color"] = "FFFFFF",
["left terminus"] = "Sandringham",
["right terminus"] = "W via FS"
},
["Stony Point"] = {
["title"] = "[[Stony Point line]]",
["color"] = "028430",
["text color"] = "FFFFFF",
["left terminus"] = "Frankston",
["right terminus"] = "Stony Point"
},
["Suburban Rail Loop"] = {
["title"] = "[[Suburban Rail Loop]]<br />(under construction)",
["color"] = "008746",
["text color"] = "FFFFFF",
["left terminus"] = "Cheltenham",
["right terminus"] = "Werribee",
["icon"] = "[[File:Melbourne Suburban Rail Loop logo.svg|18px|link=Suburban Rail Loop]]"
},
["Suburban Rail Loop East"] = {
["title"] = "[[Suburban Rail Loop|Suburban Rail Loop East]]<br />(under construction)",
["color"] = "008746",
["text color"] = "FFFFFF",
["left terminus"] = "Southland",
["right terminus"] = "Box Hill",
["icon"] = "[[File:Melbourne Suburban Rail Loop logo.svg|18px|link=Suburban Rail Loop]]"
},
["Sunbury"] = {
["title"] = "[[Sunbury line]]",
["color"] = "ffbe00",
["left terminus"] = "Flinders Street",
["right terminus"] = {"Watergardens", "Sunbury"},
},
["SunburyN"] = {
["title"] = "[[Sunbury line]]",
["color"] = "ffbe00",
["left terminus"] = "Flinders Street",
["right terminus"] = {"Watergardens", "Sunbury"},
},
["SunburyM"] = {
["title"] = "[[Sunbury line]]",
["color"] = "279fd5",
["text color"] = "FFFFFF",
["left terminus"] = "EC via TH",
["right terminus"] = {"Watergardens", "Sunbury"},
},
["Upfield"] = {
["title"] = "[[Upfield line]]",
["color"] = "ffbe00",
["left terminus"] = "Flinders Street",
["right terminus"] = "Upfield"
},
["Werribee"] = {
["title"] = "[[Werribee line]]",
["color"] = "028430",
["text color"] = "FFFFFF",
["left terminus"] = "F via FS",
["right terminus"] = "Werribee"
},
["Werrlbee"] = {
["title"] = "[[Werribee line]]",
["color"] = "f178af",
["text color"] = "FFFFFF",
["left terminus"] = "S via FS",
["right terminus"] = "Werribee"
},
["Williamstown"] = {
["title"] = "[[Williamstown line]]",
["color"] = "028430",
["text color"] = "FFFFFF",
["left terminus"] = "F via FS",
["right terminus"] = "Williamstown"
},
["WilIiamstown"] = {
["title"] = "[[Williamstown line]]",
["color"] = "f178af",
["text color"] = "FFFFFF",
["left terminus"] = "S via FS",
["right terminus"] = "Williamstown"
},
["V/Line"] = {
["title"] = "[[V/Line]]",
["color"] = "8f1a95",
["text color"] = "FFFFFF",
["icon"] = "[[File:Victoria_train_logo.svg|18px|link=Railways in Victoria|alt=Railways in Victoria]]",
},
},
["aliases"] = {
["flemington"] = "Flemington Racecourse",
["airport"] = "Melbourne Airport",
["cranbournepakenhamsunbury"] = "Cranbourne, Pakenham and Sunbury",
["metrotunnel"] = "Cranbourne, Pakenham and Sunbury",
}
}
return p;