--Oregon[==[
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"]`.
]==]
-- Oregon
local OR = {}
local util = require("Module:Road data/util")
OR.I = {shield = "I-%route%.svg",
util.addAll(OR, require("Module:Road data/strings/USA"))
link = "Interstate %route% (Oregon)",
local format = mw.ustring.format
abbr = "I-%route%",
width = "expand"}
local suffix = " ([dab||%dab%, |]Oregon)"
OR.BL = {shield = "Business Loop %route%.svg",
link = "Interstate %route% Business ([dab||%dab%, |]Oregon)",
abbr = "I-%route% Bus.",
width = "expand"}
OR.I.link = {
OR["I 1957"] = {shield = "I-%route% (1957).svg",
["82"] = "Interstate 82",
link = OR.I.link,
["205"] = "Interstate 205 (Oregon–Washington)",
abbr = OR.I.abbr}
default = {
hook = "splitlen",
OR["I 1961"] = {shield = {["80N"] = "I-%route% (1957).svg",
split = 3,
default = {hook = "splitlen",
above = "Interstate %route% (Oregon)",
split = 3,
above below = "I-Interstate %route% (1961).svgin Oregon",
}
below = "I-%route% (1957).svg"}},
}
link = OR.I.link,
abbr = OR.I.abbr}
for k, v in pairs(OR) do if k:find ("^I") then
OR.US = {shield = "US %route%.svg",
v.link = OR.I.link
link = "U.S. Route %route% in Oregon",
end
abbr = "US %route%",
end width = "expand"}
OR["I 1961"].shield = {
["80N"] = "I-%route% (1957).svg",
default = {
hook = "splitlen",
split = 3,
above = "I-%route% (1961).svg",
below = "I-%route% (1957).svg"
}
}
OR["US 1926"] = {shield.BL.link = "USInterstate %route% Business ([dab||%dab%, |]Oregon 1926.svg)",
link = OR.US.link,
abbr = OR.US.abbr,
width = "US1926"}
OR["US 1948"] = {shield = "US %route% (1948).svg",
link = OR.US.link,
abbr = OR.US.abbr,
width = "US1926"}
for k, v in pairs(OR) do if k:find ("^BL") then
OR["US 1961"] = {shield = "US %route% (1961).svg",
v.link = OR.USBL.link,
end
abbr = OR.US.abbr}
end
OR["US 1961-Alt"] = {shield = OR["US 1961"].shield,
link = "U.S. Route %route% Alternate ([dab||%dab%, |]Oregon)",
abbr = "US %route% Alt.",
banner = "Alternate plate.svg"}
OR.US.name = "U.S. Highway %route%"
OR["US-Alt"] = {shield = OR.US.shield,
OR.US.link = {
link = "U.S. Route %route% Alternate ([dab||%dab%, |]Oregon)",
["28"] = "U.S. Route 28",
abbr = "US %route% Alt.",
["126"] = "U.S. Route 126",
banner = "Alternate plate.svg",
["197"] = "U.S. Route 197",
width = "expand"}
["199"] = "U.S. Route 199",
["630"] = "U.S. Route 630",
["730"] = "U.S. Route 730",
default = "U.S. Route %route% in Oregon"
}
for k, v in pairs(OR) do if k:find ("^US %d") then
OR["US-Bus"] = {shield = OR.US.shield,
v.name = OR.US.name
link = "U.S. Route %route% Business ([dab||%dab%, |]Oregon)",
v.link = OR.US.link
abbr = "US %route% Bus.",
end
banner = "Business plate.svg",
end
width = "expand"}
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
OR["US-Byp"] = {shield = OR.US.shield,
local spec = OR[" aux "][auxType]
link = "U.S. Route %route% Bypass ([dab||%dab%, |]Oregon)",
for k, v in pairs(OR) do if k:find (auxType) then if k:find ("^US") then
abbr = "US %route% Byp.",
v.name = OR.US.name .. " " .. spec.name
banner = "By-pass plate.svg",
v.link = OR.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Oregon)"
width = "expand"}
end
end
end
end
OR["US 1961-SpurAlt"] = { shield = OR.["US 1961"].shield,
name = OR["US-Alt"].name,
link = "U.S. Route %route% Spur ([dab||%dab%, |]Oregon)",
abbrlink = OR["US %route% Spur-Alt"].link,
bannerabbr = OR["Spur plateUS-Alt"].svg"abbr,
banner = "Alternate plate.svg",
width = "expand"}
aux = OR[" aux "].Alt
}
OR.OR = { shield = "OR %route%.svg",
name = "Oregon Route %route%", link = "Oregon Route %route% [dab||(%dab%)|]",
abbr = "OR %route%",
width = "expand" }
OR["OR-Bus"] = { shield = OR.OR.shield,
name = OR.OR.name link =.. "Oregon Route %route% Business",
link = "Oregon Route %route% Business [dab||(%dab%)|]",
abbr = OR.OR.abbr .. " Bus.",
abbr = OR.OR.abbr .. " Bus.",
banner = "Business plate.svg",
banner = "Business plate.svg",
width = "expand"}
width = "expand",
aux = OR[" aux "].Bus
}
OR["OR-Spur"] = { shield = OR.OR.shield,
name = OR.OR.name .. " Spur",
link = "Oregon Route %route% Business",
link = "Oregon Route %route% Spur [dab||(%dab%)|]",
abbr = OR.OR.abbr .. " Spur",
abbr = OR.OR.abbr .. " Spur",
banner = "Spur plate.svg",
banner = "Spur plate.svg",
width = "expand"}
width = "expand",
aux = OR[" aux "].Spur
OR["OR 1932"] = {shield = "OR %route% 1932.svg",
}
link = "Oregon Route %route% [dab||(%dab%)|]",
abbr = "OR %route%",
width = "expand"}
for _,type in ipairs({"OR"}) do
OR["OR 1948"] = {shield = "OR %route% 1948.svg",
for _,year in ipairs({"1932", "1948"}) do
link = "Oregon Route %route% [dab||(%dab%)|]",
OR["OR " .. year] = {
abbr = "OR %route%",
shield = format("OR %%route%% %s.svg", year),
width = "expand"}
name = OR.OR.name,
link = OR.OR.link,
OR.FH = {shield = "Forest Route %route%.svg",
link abbr = ""OR.OR.abbr,
width = "square"
abbr = "FH %route%"}
}
end
end
OR.FH.link = ""
local highwayNames = {
["14-1"] = "Shaniko–Mitchell Highway No. 14",
["18-1"] = "Lakeview–Burns Highway No. 18",
["23-1"] = "Klamath–Crater Lake Highway No. 23",
["24-1"] = "The Rim Highway No. 24",
["27-1"] = "Clackamas Highway No. 27",
["31-1"] = "Mount Hood–Clear Lake Highway No. 31",
["37-1"] = "Crooked River Highway No. 37",
["37-2"] = "Umatilla Cutoff Highway No. 37",
["38-1"] = "Tiller–Summit Forest Road Highway No. 38",
["39-1"] = "Deschutes Highway No. 39",
["46-1"] = "East Portland–Oregon City Highway No. 46",
["50-1"] = "Klamath Falls–Weed Highway No. 50",
["54-1"] = "Boardman–Stanfield Highway No. 54",
["164-1"] = "Butteville Road–Hubbard Highway No. 164",
["210-1"] = "Corvallis–East Side Highway No. 210",
["331-1"] = "Bingham Springs Highway No. 331",
["424-1"] = "Sand Creek Highway No. 424",
["455-1"] = "Homedale Spur Highway No. 455",
["457-1"] = "Malloy Ranch–Idaho Line Highway No. 457",
default = {
hook = "mask",
mask = "Road data/masks/USA/OR",
base = "route",
masked = "names",
default = {
["56"] = "%names% No. %route%",
["57"] = "%names% No. %route%",
["61"] = "%names% No. %route%",
["64"] = "%names% No. %route%",
["65"] = "%names% No. %route%",
["68"] = "%names% Highway North No. %route%",
["75"] = "%names% No. %route%",
["81"] = "%names% Highway East No. %route%",
["91"] = "%names% Highway West No. %route%",
["138"] = "%names% Highway East No. %route%",
["160"] = "%names% Highway South No. %route%",
default = "%names% Highway No. %route%"
}
}
}
OR.Hwy = {
shield = "",
name = highwayNames,
link = highwayNames,
abbr = highwayNames
}
OR.Hwy2 = {
shield = "",
link = OR.Hwy.link,
abbr = {
["14-1"] = "Highway 14",
["18-1"] = "Highway 18",
["23-1"] = "Highway 23",
["24-1"] = "Highway 24",
["27-1"] = "Highway 27",
["31-1"] = "Highway 31",
["37-1"] = "Highway 37",
["37-2"] = "Highway 37",
["38-1"] = "Highway 38",
["39-1"] = "Highway 39",
["46-1"] = "Highway 46",
["50-1"] = "Highway 50",
["54-1"] = "Highway 54",
["164-1"] = "Highway 164",
["210-1"] = "Highway 210",
["331-1"] = "Highway 331",
["424-1"] = "Highway 424",
["455-1"] = "Highway 455",
["457-1"] = "Highway 457",
default = "Highway %route%"
}
}
-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(OR) do if k:find ("^%a") then
v.maint = "[[Oregon Department of Transportation|ODOT]]"
v.browse = "[[State highways in Oregon|Oregon Highways]]"
v.browselinks = {
[1] = "[[List of Interstate Highways in Oregon|Interstate]]",
[2] = "[[List of U.S. Highways in Oregon|US]]",
[3] = "[[List of numbered state routes in Oregon|State]]",
[4] = "[[List of named state highways in Oregon|Named]]",
[5] = "[[Oregon State Scenic Byways|Scenic]]"
}
end
end
for k, v in pairs(OR) do if k:find ("^%a+ %d") then
v.maint = "[[Oregon State Highway Department]]"
end
end
OR.CA = {alias = {module = "USA/CA", type = "SR"}}
OR.ID = {alias = {module = "USA/ID", type = "SH"}}
OR.NV = {alias = {module = "USA/NV", type = "NV"}}
local highwayNames = {["1"] = "Pacific Highway",
["2"] = "Columbia River",
["3"] = "Oswego",
["4"] = "The Dalles–California",
["5"] = "John Day",
["6"] = "Old Oregon Trail",
["7"] = "Central Oregon",
["8"] = "Oregon–Washington",
["9"] = "Oregon Coast",
["10"] = "Wallowa Lake",
["11"] = "Enterprise–Lewiston",
["12"] = "Baker–Copperfield",
["14"] = "Crooked River",
["15"] = "McKenzie",
["16"] = "Santiam",
["17"] = "McKenzie–Bend",
["18"] = "Willamette",
["19"] = "Fremont",
["20"] = "Klamath Falls–Lakeview",
["21"] = "Green Springs",
["22"] = "Crater Lake",
["23"] = "Dairy–Bonanza",
["25"] = "Redwood",
["26"] = "Mt. Hood",
["27"] = "Alsea",
["28"] = "Pendleton–John Day",
["29"] = "Tualatin Valley",
["30"] = "Willamina–Salem",
["31"] = "Albany–Corvallis",
["32"] = "Three Rivers",
["33"] = "Corvallis–Newport",
["35"] = "Coos Bay–Roseburg",
["36"] = "Pendleton–Cold Springs",
["37"] = "Wilson River",
["38"] = "Oregon Caves",
["39"] = "Salmon River",
["40"] = "Beaverton–Hillsdale",
["41"] = "Ochoco",
["42"] = "Sherman",
["43"] = "Monmouth–Independence",
["44"] = "Wapinitia",
["45"] = "Umpqua",
["46"] = "Necanicum",
["47"] = "Sunset",
["48"] = "John Day–Burns",
["49"] = "Lakeview–Burns",
["50"] = "Klamath Falls–Malin",
["51"] = "Wilsonville–Hubbard",
["52"] = "Heppner",
["53"] = "Warm Springs",
["54"] = "Umatilla–Stanfield",
["58"] = "Albany–Junction City",
["60"] = "Rogue River",
["61"] = "Stadium Freeway",
["62"] = "Florence–Eugene",
["63"] = "Rogue Valley",
["64"] = "East Portland Freeway",
["66"] = "La Grande–Baker",
["67"] = "Pendleton",
["68"] = "Cascade",
["69"] = "Beltline",
["70"] = "McNary",
["71"] = "Whitney",
["72"] = "Salem",
["75"] = "Sunrise Expressway",
["81"] = "Pacific",
["91"] = "Pacific",
["92"] = "Lower Columbia River",
["100"] = "Historic Columbia River",
["102"] = "Nehalem",
["103"] = "Fishhawk Falls",
["104"] = "Fort Stevens",
["105"] = "Warrenton–Astoria",
["110"] = "Mist–Clatskanie",
["120"] = "Swift",
["123"] = "Northeast Portland",
["130"] = "Little Nestucca",
["131"] = "Netarts",
["132"] = "Delta",
["138"] = "North Umpqua",
["140"] = "Hillsboro–Silverton",
["141"] = "Beaverton–Tualatin",
["142"] = "Farmington",
["143"] = "Scholls",
["144"] = "Beaverton–Tigard",
["150"] = "Salem–Dayton",
["151"] = "Yamhill–Newberg",
["153"] = "Bellevue–Hopewell",
["154"] = "Lafayette",
["155"] = "Amity–Dayton",
["157"] = "Willamina–Sheridan",
["160"] = "Cascade",
["161"] = "Woodburn–Estacada",
["162"] = "North Santam",
["163"] = "Silver Creek Falls",
["164"] = "Jefferson",
["171"] = "Clackamas",
["172"] = "Eagle Creek–Sandy",
["173"] = "Timberline",
["174"] = "Clackamas–Boring",
["180"] = "Eddyville–Blodgett",
["181"] = "Siletz",
["189"] = "Dallas–Rickreall",
["191"] = "Kings Valley",
["193"] = "Independence",
["194"] = "Monmouth",
["200"] = "Territorial",
["201"] = "Alsea–Deadwood",
["210"] = "Corvallis–Lebanon",
["211"] = "Albany–Lyons",
["212"] = "Halsey–Sweet Home",
["215"] = "Clear Lake–Belknap Springs",
["225"] = "McVay",
["226"] = "Goshen–Divide",
["227"] = "Eugene–Springfield",
["228"] = "Springfield",
["229"] = "Mapleton–Junction City",
["231"] = "Elkton–Sutherlin",
["233"] = "West Diamond Lake",
["240"] = "Cape Arago",
["241"] = "Coos River",
["242"] = "Powers",
["244"] = "Coquille–Bandon",
["250"] = "Cape Blanco",
["251"] = "Port Orford",
["255"] = "Carpenterville",
["260"] = "Rogue River Loop",
["270"] = "Lake of the Woods",
["271"] = "Sams Valley",
["272"] = "Jacksonville",
["273"] = "Siskiyou",
["281"] = "Hood River",
["282"] = "Odell",
["290"] = "Sherars Bridge",
["291"] = "Shaniko–Fossil",
["292"] = "Mosier–The Dalles",
["293"] = "Antelope",
["300"] = "Wasco–Heppner",
["301"] = "Celilo–Wasco",
["320"] = "Lexington–Echo",
["321"] = "Heppner–Spray",
["330"] = "Weston–Elgin",
["331"] = "Umatilla Mission",
["332"] = "Sunnyside–Umapine",
["333"] = "Hermiston",
["334"] = "Athena–Holdman",
["335"] = "Havana–Helix",
["339"] = "Freewater",
["340"] = "Medical Springs",
["341"] = "Ukiah–Hilgard",
["342"] = "Cove",
["350"] = "Little Sheep Creek",
["351"] = "Joseph–Wallowa Lake",
["360"] = "Madras–Prineville",
["361"] = "Culver",
["370"] = "O'Neil",
["372"] = "Century Drive",
["380"] = "Paulina",
["390"] = "Service Creek–Mitchell",
["402"] = "Kimberly–Long Creek",
["410"] = "Sumpter",
["413"] = "Halfway–Cornucopia",
["414"] = "Pine Creek",
["415"] = "Dooley Mountain",
["420"] = "Midland",
["422"] = "Chiloquin",
["424"] = "South Klamath Falls",
["426"] = "Hatfield",
["429"] = "Crescent Lake",
["431"] = "Warner",
["440"] = "Frenchglen",
["442"] = "Steens",
["449"] = "Huntington",
["450"] = "Succor Creek",
["451"] = "Vale–West",
["453"] = "Adrian–Arena Valley",
["454"] = "Adrian–Caldwell",
["455"] = "Olds Ferry–Ontario",
["456"] = "I.O.N.",
["457"] = "Snake River Correctional Institution",
["481"] = "Baker–Copperfield",
["482"] = "Redwood",
["483"] = "McMinnville",
["484"] = "Esplanade",
["485"] = "Fort Stevens",
["486"] = "Gold Hill",
["488"] = "Chiloquin",
["487"] = "Celilo–Wasco",
["489"] = "Parma",
["490"] = "Homedale",
["491"] = "Weiser",
["492"] = "Payette",
["493"] = "Ontario" }
local highwaySuffix = { default = " No. %route%",
["68"] = " North No. %route%",
["81"] = " East No. %route%",
["91"] = " West No. %route%",
["138"] = " East No. %route%",
["160"] = " South No. %route%"}
OR.Hwy = { shield = "",
link = highwayNames .. {["61"] = "",
["64"] = "",
["75"] = "",
default = {hook = "split",
split = 481,
above = " Spur",
below = " Highway"}} .. highwaySuffix,
abbr = "No. %route%"
}
return OR
|