Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Road data/strings/CAN/ON/sandbox

From Wikipedia, the free encyclopedia
--[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
and enter the following input text:
  {{#invoke:Road data/dump|dump|module=Module:<name-of-this-module>}}

To inspect the content of this data module when editing, enter the following
into the Debug console:
  local util = require("Module:Road data/util")
  print(util.arrayToString(p))
To inspect a particular route type, change `p` above to include the route type,
e.g., `p.I` and `p["US-Hist"]`.
]==]

-- Ontario
local ON = {}

local util = require("Module:Road data/util")
util.addAll(ON, require("Module:Road data/strings/CAN"))

ON.ON = {
	shield = {
		["Allen"] = "", --"Allen Road Shield.svg",
		["BCD"] = "",
		["DVP"] = "DVP Shield.svg",
		["Gardiner"] = "Gardiner Shield.svg",
		["Veterans"] = "",
		["Conestoga"] = "",
		["Hanlon"] = "",
		["SWSE"] = "Ontario 17 crown.svg",
		["QEW"] = "Ontario QEW crown.svg",
		["451"] = "Ontario QEW crown.svg",
		default = {
			hook = "split",
			split = 500,
			above = "Ontario Highway %route%.svg",
			below = "Ontario %route% crown.svg"
		}
	},
	shieldmain = {
		["7"] = {"Ontario %route%.svg", "TCH-COR.svg"},
		["11"] = {"Ontario %route%.svg", "Trans-Canada Highway shield.svg"},
		["12"] = {"Ontario %route%.svg", "TCH-COR.svg"},
		["17"] = {"Ontario %route%.svg", "TCH-LSR.svg", "TCH-OVR.svg"},
		["21"] = {"Ontario %route%.svg", "BluewaterTrail_infobox.svg"},
		["66"] = {"Ontario %route%.svg", "TCH-NOR.svg"},
		["69"] = {"Ontario %route%.svg", "TCH-GBR.svg"},
		["71"] = {"Ontario %route%.svg", "TCH-NOR.svg"},
		["400"] = {"Ontario %route%.svg", "TCH-GBR.svg"},
		["401"] = {"Ontario %route%.svg", "MC-Freeway.svg"},
		["417"] = {"Ontario %route%.svg", "TCH-OVR.svg"},
		["Conestoga"] = {"Ontario 7.svg", "Ontario 8.svg", "Ontario 85.svg"},
		["Hanlon"] = {"Ontario 6.svg", "Ontario 7.svg"},
		["SWSE"] = {"Ontario 17.svg", "Trans-Canada Highway shield.svg"},
		["QEW"] = "Ontario QEW.svg",
		["451"] = "Ontario QEW.svg",
		default = {
			hook = "split",
			split = 500,
			above = "Ontario Highway %route%.svg",
			below = "Ontario %route%.svg"
		}
	},
	shieldlist = {
		["Conestoga"] = {"Ontario 7.svg", "Ontario 8.svg", "Ontario 85.svg"},
		["Hanlon"] = {"Ontario 6.svg", "Ontario 7.svg"},
		["SWSE"] = {"Ontario 17.svg"},
		["QEW"] = "Ontario QEW.svg",
		["451"] = "Ontario QEW.svg",
		default = {
			hook = "split",
			split = 500,
			above = "Ontario Highway %route%.svg",
			below = "Ontario %route%.svg"
		}
	},
	shieldto = {
		["Allen"] = "", --"Allen Road Shield.svg",
		["BCD"] = "",
		["DVP"] = "DVP Shield.svg",
		["Gardiner"] = "Gardiner Shield.svg",
		["Veterans"] = "",
		["Conestoga"] = "",
		["Hanlon"] = "",
		["SWSE"] = "Ontario To 17 crown.svg",
		["QEW"] = "Ontario To QEW crown.svg",
		["451"] = "Ontario To QEW crown.svg",
		default = {
			hook = "split",
			split = 500,
			above = "Ontario Highway %route%.svg",
			below = "Ontario To %route% crown.svg"
		}
	},
	name = {
		["Allen"] = "William R. Allen Road",
		["BCD"] = "Black Creek Drive",
		["DVP"] = "Don Valley Parkway",
		["Gardiner"] = "Gardiner Expressway",
		["Veterans"] = "Veterans Memorial Parkway",
		["Conestoga"] = "Conestoga Parkway",
		["Hanlon"] = "Hanlon Expressway",
		["SWSE"] = "Southwest Bypass / Southeast Bypass",
		["QEW"] = "Queen Elizabeth Way",
		["451"] = "Queen Elizabeth Way",
		default = "Highway %route%"
	},
	link = {
		["Allen"] = "Allen Road",
		["BCD"] = "Black Creek Drive",
		["DVP"] = "Don Valley Parkway",
		["Gardiner"] = "Gardiner Expressway",
		["Veterans"] = "Veterans Memorial Parkway",
		["Conestoga"] = "Conestoga Parkway",
		["Hanlon"] = "Hanlon Expressway",
		["SWSE"] = "Southwest and Southeast Bypasses",
		["QEW"] = "Queen Elizabeth Way",
		["451"] = "Queen Elizabeth Way",
		default = "Ontario Highway %route%"
	},
	abbr = {
		["Allen"] = "Allen Road",
		["DVP"] = "Don Valley Parkway",
		["Gardiner"] = "Gardiner Expressway",
		["Veterans"] = "",
		["Conestoga"] = "",
		["Hanlon"] = "",
		["SWSE"] = "Highway 17",
		["QEW"] = "Queen Elizabeth Way",
		["451"] = "Queen Elizabeth Way",
		default = "Highway %route%"
	},
	orientation = "upright"
}

ON.Hwy = ON.ON
ON.Highway = ON.ON

ON.Fwy = {
	shield = ON.ON.shield,
	shieldmain = ON.ON.shieldmain,
	shieldlist = ON.ON.shieldlist,
	name = ON.ON.name,
	link = ON.ON.link,
	abbr = ON.ON.abbr,
	color = "MUTCDblue",
	orientation = "upright"
}

ON.Secondary = {
	shield = "Ontario Highway %route%.svg",
	name = ON.ON.name.default,
	link = ON.ON.link.default,
	abbr = ON.ON.abbr.default,
}

ON.Sec = ON.Secondary

ON.Shield = {
	shield = {
		["Allen"] = "", --"Allen Road Shield.svg",
		["BCD"] = "",
		["DVP"] = "DVP Shield.svg",
		["Gardiner"] = "Gardiner Shield.svg",
		["Veterans"] = "",
		["Hanlon"] = "",
		["QEW"] = "Ontario QEW.svg",
		["451"] = "Ontario QEW.svg",
		default = {
			hook = "split",
			split = 500,
			above = "Ontario Highway %route%.svg",
			below = "Ontario %route%.svg"
		}
	},
	shieldmain = ON.ON.shieldmain,
	shieldlist = ON.ON.shieldlist,
	shieldto = {
		["Allen"] = "", --"Allen Road Shield.svg",
		["DVP"] = "DVP Shield.svg",
		["BCD"] = "",
		["Gardiner"] = "Gardiner Shield.svg",
		["Veterans"] = "",
		["Hanlon"] = "",
		["QEW"] = "Ontario QEW.svg",
		["451"] = "Ontario QEW.svg",
		default = {
			hook = "split",
			split = 500,
			above = "Ontario Highway %route%.svg",
			below = "Ontario %route%.svg"
		}
	},
	name = ON.ON.name,
	link = ON.ON.link,
	abbr = ON.ON.abbr,
	orientation = "upright"		
}

ON.Tertiary = {
	shield = "Ontario Highway %route%.svg",
	name = ON.ON.name.default,
	link = ON.ON.link.default,
	abbr = ON.ON.abbr.default,
	orientation = "upright"
}

ON.Ter = ON.Tertiary

ON.Toll = {
	shield = "Ontario %route% crown toll.svg",
	shieldmain = "Ontario %route% Toll.svg",
	shieldlist = "Ontario %route% Toll.svg",
	name = ON.ON.name.default,
	link = ON.ON.link.default,
	abbr = ON.ON.abbr.default,
	orientation = "upright"
}

ON["Toll Shield"] = {
	shield = {
		default = "Ontario Highway %route% Toll.svg",
		["407"] = "Ontario Highway 407E.svg"
	},
	shieldmain = ON.Toll.shieldmain,
	shieldlist = ON.Toll.shieldlist,
	name = ON.ON.name,
	link = ON.ON.link,
	abbr = ON.ON.abbr,
	orientation = "upright"
}

ON.TS = ON["Toll Shield"]

ON.ETR = {
	shield = {["407"] = "Highway407crest.svg", default = ''},
	shieldmain = {["407"] = "407 Express Toll Route Traffic Sign.svg", default = ''},
	shieldlist = {["407"] = "407 Express Toll Route Traffic Sign.svg", default = ''},
	name = {["407"] = "407 ETR", default = ''},
	link = ON.ON.link.default,
	abbr = {["407"] = "407 ETR", default = ''},
	orientation = "upright"
}

ON.Both = {
	shield = {["407"] = {"Highway407crest.svg", "Ontario 407 crown toll.svg"}, default = ''},
	shieldmain = {["407"] = {"407 Express Toll Route Traffic Sign.svg", "Ontario 407 Toll.svg"}, default = ''},
	shieldlist = {["407"] = {"407 Express Toll Route Traffic Sign.svg", "Ontario 407 Toll.svg"}, default = ''},
	name = {["407"] = "407 ETR / Highway 407", default = ''},
	link = ON.ON.link.default,
	abbr = ON.ON.abbr.default,
	orientation = "upright"
}

ON["ON 1960"] = {
	shield = "Ontario King's Highway %route%.svg",
	name = "King's Highway %route%",
	link = ON.ON.link.default,
	abbr = ON.ON.abbr.default,
	orientation = "upright"
}

for k, v in pairs(ON) do if k:find ("TCH") then 
	v.shield = "Trans-Canada Highway shield.svg"
	v.orientation = "upright"
	end
end

ON.QEW = {
	shield = "Ontario QEW crown.svg",
	shieldmain = "Ontario QEW.svg",
	shieldto = "Ontario To QEW crown.svg",
	name = "Queen Elizabeth Way",
	link = "Queen Elizabeth Way",
	abbr = "Queen Elizabeth Way",
	color = "MUTCDblue",
	orientation = "upright"
}

-- Great Lakes parkways ONLY
ON.Parkway = {
	name = "%route% Parkway",
	link = "%route% Parkway",
	abbr = "%route% Parkway",
	color = "hist"
}

-- add new types above this line if you want it to have the provincial highway browse and maint
for k, v in pairs(ON) do if k:find ("^%a") then
	v.maint = "[[Ministry of Transportation of Ontario]]"
	end
end

-- Municipal expressways ONLY
ON.Expressway = {
	shield = {
		["174"] = "Ottawa Road 174 Shield.png",
		["Allen"] = "Allen Road Shield.svg",
		["DVP"] = "DVP Shield.svg",
		["Gardiner"] = "Gardiner Shield.svg",
		default = ""
	},
	name = {
		["174"] = "Ottawa Road 174",
		["2A"] = "Highway 2A",
		["Allen"] = "William R. Allen Road",
		["BCD"] = "Black Creek Drive",
		["DVP"] = "Don Valley Parkway",
		["Gardiner"] = "Gardiner Expressway",
		default = "%route%"
	},
	link = {
		["174"] = "Ottawa Road 174",
		["2A"] = "Ontario Highway 2A",
		["Allen"] = "Allen Road",
		["BCD"] = "Black Creek Drive",
		["DVP"] = "Don Valley Parkway",
		["Gardiner"] = "Gardiner Expressway",
		default = ""
	},
	abbr = {
		["174"] = "Ottawa Road 174",
		["2A"] = "Highway 2A",
		["Allen"] = "Allen Road",
		["BCD"] = "Black Creek Drive",
		["DVP"] = "Don Valley Parkway",
		["Gardiner"] = "Gardiner Expressway",
		default = "%route%"
	},
	color = "MUTCDblue",
	orientation = "upright",
	maint = ""
}

-- Toronto municipal expressways
ON.Toronto = {
	shield = ON.Expressway.shield,
	name = ON.Expressway.name,
	link = ON.Expressway.link,
	abbr = ON.Expressway.abbr,
	color = "MUTCDblue",
	orientation = "upright",
	maint = "[[Toronto Transportation Services]]"
}

-- National Capital Commission parkways
ON.NCC = {
	name = "%route%",
	link = "%route%",
	abbr = "%route%",
	color = "MUTCDgreen",
	maint = '[[National Capital Commission]]'
}

local regions = {
	['Brant'] = {
		['prefix'] = 'Brant',
		['type'] = 'County Road'
	},
	['Brant County Highway'] = {
		['prefix'] = 'Brant',
		['type'] = 'County Highway',
		['aliases'] = {'BCH'}
	},
	['Bruce'] = {
		['prefix'] = 'Bruce',
		['type'] = 'County Road'
	},
	['Carleton'] = {
		['prefix'] = 'Carleton',
		['type'] = 'County Road'
	},
	['Central Frontenac'] = {
		['prefix'] = 'Central Frontenac',
		['type'] = 'Township Road',
		['shieldmain'] = 'Central Frontenac Township Road %route%.svg',
		['aliases'] = {'C Frontenac'}
	},
	['Chatham-Kent'] = {
		['prefix'] = 'Chatham-Kent',
		['type'] = 'Municipal Road',
		['aliases'] = {'Chatham Kent', 'CK'}
	},
	['Cornwall'] = {
		['prefix'] = 'Cornwall',
		['type'] = 'Municipal Road'
	},
	['Dufferin'] = {
		['prefix'] = 'Dufferin',
		['type'] = 'County Road'
	},
	['Durham'] = {
		['prefix'] = 'Durham',
		['type'] = 'Regional Road',
		['shieldmain'] = 'Durham Regional Road %route%.svg'
	},
	['Durham Regional Highway'] = {
		['prefix'] = 'Durham',
		['type'] = 'Regional Highway',
		['shieldmain'] = 'Durham Regional Highway %route%.svg',
		['aliases'] = {'DRH'}
	},
	['Elgin'] = {
		['prefix'] = 'Elgin',
		['type'] = 'County Road'
	},
	['Essex'] = {
		['prefix'] = 'Essex',
		['type'] = 'County Road',
		['shieldmain'] = 'Essex County Road %route%.png'
	},
	['Frontenac'] = {
		['prefix'] = 'Frontenac',
		['type'] = 'County Road'
	},
	['Frontenac Islands'] = {
		['prefix'] = 'Frontenac Islands',
		['type'] = 'Township Road',
		['aliases'] = {'FI'}
	},
	['Grey'] = {
		['prefix'] = 'Grey',
		['type'] = 'County Road',
		['shield'] = 'RR %route% jct blue.svg'
	},
	['Haldimand'] = {
		['prefix'] = 'Haldimand',
		['type'] = 'County Road'
	},
	['Haldimand County Highway'] = {
		['prefix'] = 'Haldimand',
		['type'] = 'County Highway',
		['aliases'] = {'HCH'}
	},
	['Haliburton'] = {
		['prefix'] = 'Haliburton',
		['type'] = 'County Road',
		['aliases'] = {'HH'}
	},
	['Halton'] = {
		['prefix'] = 'Halton',
		['type'] = 'Regional Road',
		['shield'] = 'Halton RR %route% jct.svg',
		['shieldmain'] = 'Halton Regional Road %route%.svg'
	},
	['Hamilton'] = {
		['prefix'] = 'Hamilton',
		['type'] = 'City Road',
		['shield'] = 'RR %route% jct blue.svg',
		['shieldmain'] = 'Hamilton Ontario Road %route% Shield.svg'
	},
	['Hamilton Regional Road'] = {
		['prefix'] = 'Hamilton',
		['type'] = 'Regional Road',
		['shield'] = 'RR %route% jct blue.svg',
		['shieldmain'] = 'Hamilton Ontario Road %route% Shield.svg',
		['aliases'] = {'HRR'}
	},
	['Hastings'] = {
		['prefix'] = 'Hastings',
		['type'] = 'County Road'
	},
	['Huron'] = {
		['prefix'] = 'Huron',
		['type'] = 'County Road'
	},
	['Kawartha Lakes'] = {
		['prefix'] = 'Kawartha Lakes',
		['type'] = 'Road',
		['shieldmain'] = 'KL Road %route%.svg',
		['aliases'] = {'CKL', 'Kawartha Lake', 'KL', 'klinfo'}
	},
	['Kingston'] = {
		['prefix'] = 'Kingston',
		['type'] = 'Road',
		['shieldmain'] = 'Kingston City Road %route%.svg'
	},
	['Lambton'] = {
		['prefix'] = 'Lambton',
		['type'] = 'County Road'
	},
	['Lanark'] = {
		['prefix'] = 'Lanark',
		['type'] = 'County Road'
	},
	['Leeds and Grenville'] = {
		['prefix'] = 'Leeds and Grenville',
		['type'] = 'County Road'
	},
	['Lennox and Addington'] = {
		['prefix'] = 'Lennox and Addington',
		['type'] = 'County Road',
		['aliases'] = {'LA'}
	},
	['Middlesex'] = {
		['prefix'] = 'Middlesex',
		['type'] = 'County Road'
	},
	['Muskoka'] = {
		['prefix'] = 'Muskoka',
		['type'] = 'District Road'
	},
	['Niagara'] = {
		['prefix'] = 'Niagara',
		['type'] = 'Regional Road',
		['shield'] = 'RR %route% jct blue.svg',
		['shieldmain'] = 'Niagara Regional Road %route%.svg'
	},
	['Norfolk'] = {
		['prefix'] = 'Norfolk',
		['type'] = 'County Road'
	},
	['Norfolk County Highway'] = {
		['prefix'] = 'Norfolk',
		['type'] = 'County Highway',
		['aliases'] = {'NCH'}
	},
	['North Dumfries'] = {
		['prefix'] = 'North Dumfries',
		['type'] = 'Township Road',
		['aliases'] = {'N Dumfries'}
	},
	['North Frontenac'] = {
		['prefix'] = 'North Frontenac',
		['type'] = 'Township Road',
		['aliases'] = {'N Frontenac'}
	},
	['Northumberland'] = {
		['prefix'] = 'Northumberland',
		['type'] = 'County Road'
	},
	['Ottawa'] = {
		['prefix'] = 'Ottawa',
		['type'] = 'Road'
	},
	['Ottawa-Carleton'] = {
		['prefix'] = 'Ottawa–Carleton',
		['type'] = 'Regional Road',
		['aliases'] = {'OC'}
	},
	['Oxford'] = {
		['prefix'] = 'Oxford',
		['type'] = 'County Road'
	},
	['Peel'] = {
		['prefix'] = 'Peel',
		['type'] = 'Regional Road',
		['shield'] = 'Peel RR %route% jct.svg',
		['shieldmain'] = 'Peel Regional Road %route%.svg'
	},
	['Peterborough'] = {
		['prefix'] = 'Peterborough',
		['type'] = 'County Road',
		['aliases'] = {'PB'}
	},
	['Prescott and Russell'] = {
		['prefix'] = 'Prescott and Russell',
		['type'] = 'County Road',
		['aliases'] = {'PR'}
	},
	['Prince Edward'] = {
		['prefix'] = 'Prince Edward',
		['type'] = 'County Road',
		['aliases'] = {'PEC'}
	},
	['Quinte West'] = {
		['prefix'] = 'Quinte West',
		['type'] = 'Municipal Road',
		['aliases'] = {'CQW', 'QW', 'qwinfo'}
	},
	['Renfrew'] = {
		['prefix'] = 'Renfrew',
		['type'] = 'County Road'
	},
	['Simcoe'] = {
		['prefix'] = 'Simcoe',
		['type'] = 'County Road',
		['shieldmain'] = 'Simcoe Road %route% sign.png'
	},
	['South Frontenac'] = {
		['prefix'] = 'South Frontenac',
		['type'] = 'Township Road',
		['shieldmain'] = 'South Frontenac Township Road %route%.svg',
		['aliases'] = {'S Frontenac'}
	},
	['Stormont, Dundas and Glengarry'] = {
		['prefix'] = 'Stormont, Dundas and Glengarry',
		['type'] = 'County Road',
		['aliases'] = {'SDG', 'Stormont Dundas and Glengarry', 'Stormont, Dundas, Glengarry'}
	},
	['Sudbury'] = {
		['prefix'] = 'Greater Sudbury',
		['type'] = 'Municipal Road',
		['shieldmain'] = 'Greater Sudbury %route%.svg',
		['aliases'] = {'Greater Sudbury', 'GS', 'SB'}
	},
	['Tyendinaga'] = {
		['prefix'] = 'Tyendinaga',
		['type'] = 'Township Road'
	},
	['Waterloo'] = {
		['prefix'] = 'Waterloo',
		['type'] = 'Regional Road',
		['shieldmain'] = 'Waterloo Regional Road %route%.svg'
	},
	['Wellesley'] = {
		['prefix'] = 'Wellesley',
		['type'] = 'Township Road'
	},
	['Wellington'] = {
		['prefix'] = 'Wellington',
		['type'] = 'County Road'
	},
	['Wilmot'] = {
		['prefix'] = 'Wilmot',
		['type'] = 'Township Road'
	},
	['Wollaston'] = {
		['prefix'] = 'Wollaston',
		['type'] = 'Township Road'
	},
	['Woolwich'] = {
		['prefix'] = 'Woolwich',
		['type'] = 'Township Road'
	},
	['York'] = {
		['prefix'] = 'York',
		['type'] = 'Regional Road',
		['shieldmain'] = 'York Regional Road %route%.svg',
		['aliases'] = {'YR'}
	}
}

for region, def in pairs(regions) do
	ON[region] = {
		shield = def.shield or 'RR %route% jct.svg',
		shieldmain = def.shieldmain or def.shield or 'RR %route% jct.svg',
		shieldlist = def.shieldmain or def.shield or 'RR %route% jct.svg',
		name = def.prefix .. ' ' .. def.type .. '&nbsp;%route%',
		link = {
			ifexists = true,
			default = def.prefix .. ' ' .. def.type .. '&nbsp;%route%'
		},
		abbr = def.type .. '&nbsp;%route%'
	}
	
	if def.aliases then
		for _, alias in ipairs(def.aliases) do
			ON[alias] = ON[region]
		end
	end
end

ON.Perth = {
	shield = 'RR %route% jct.svg',
	shieldmain = {
		hook = "split",
		split = 100,
		above = 'Perth County Line %route%.svg',
		below = 'Perth County Road %route%.svg'
	},
	name = {
		hook = "split",
		split = 100,
		above = 'Perth County Line %route%',
		below = 'Perth County Road %route%'
	},
	link = {
		hook = "split",
		split = 100,
		above = 'Perth County Line %route%',
		below = 'Perth County Road %route%'
	}
}

ON['Perth County Line'] = ON.Perth
ON.PCL = ON.Perth

for _, type in ipairs({"County", "District", "Municipal", "Regional"}) do
	ON[type] = {
		shieldto = "RR %route% to.svg",
		shield = regionalShields,
		shieldmain = regionalShieldmains,
		name = "%county% " .. type .. " Road %route%",
		link = {
			ifexists = true,
			default = "%county% " .. type .. " Road %route%"
		},
		abbr = type .. " Road %route%",
		width = "square",
		color = "default",
		maint = "%county% " .. type .. " Transportation Department",
	}
end

ON.CR = ON.County
ON.DR = ON.District
ON.MR = ON.Municipal
ON.RR = ON.Regional

ON.RH = {
	shield = regionalShields,
	shieldmain = regionalShieldmains,
	name = "%county% Regional Highway %route%",
	link = {
		ifexists = true,
		default = "%county% Regional Highway %route%"
	},
	abbr = "Regional Highway %route%",
	color = "default",
	maint = ON.Regional.maint
}

ON.CH = {
	shield = regionalShields,
	shieldmain = regionalShieldmains,
	name = "%county% County Highway %route%",
	link = {
		ifexists = true,
		default = "%county% County Highway %route%"
	},
	abbr = "County Highway %route%",
	color = "default",
	maint = ON.County.maint
}

ON.A = {alias = {module = "CAN/QC", type = "A"}}
ON.I = {alias = {module = "USA", type = "I"}}
ON.NY = {alias = {module = "USA/NY", type = "NY"}}
ON.Tour = {alias = {module = "USA/regional/Tour", type = "Tour"}}

return ON