7,858 bytes added
, 05:47, 16 July 2021
--[==[
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"]`.
]==]
-- Minnesota
local MN = {}
local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(MN, require("Module:Road data/strings/USA"))
local suffix = " ([dab||%dab%, |]Minnesota)"
local maint = "[[Minnesota Department of Transportation|MnDOT]]"
MN[" common "] = {
browse = {
{link = "Minnesota Highway System", bold = true},
{
noprint = true,
{link = "List of Interstate Highways in Minnesota", name = "Interstate"},
{link = "List of U.S. Highways in Minnesota", name = "U.S."},
{link = "List of state highways in Minnesota", name = "State"},
{link = "Legislative route (Minnesota)", name = "Legislative routes"}
}
}
}
MN.I.maint = maint
MN.I.link = {
["35E"] = "Interstate 35E (Minnesota)",
["35W"] = "Interstate 35W (Minnesota)",
["335"] = "Interstate 335 (Minnesota)",
default = {
hook = "splitlen",
split = 3,
above = "Interstate %route%",
below = "Interstate %route% in Minnesota"
}
}
MN["I 1957"].link = MN.I.link
MN["I 1961"].link = MN.I.link
MN.BL.link = MN.I.base .. " Business" .. suffix
MN["I-Alt"].link = "Interstate %route% Alternate (Minnesota)"
MN.US.maint = maint
MN.US.name = "U.S. Highway %route%"
MN.US.link = "U.S. Route %route% in Minnesota"
MN["US 1961"].shield = "US %route% (MN 1961).svg"
MN["US 1926"].shieldmain = "US %route% Minnesota 1926.svg"
MN["US 1926"].name = MN.US.name
MN["US 1926"].link = MN.US.link
MN["US 1948"].shieldmain = "US %route% Minnesota 1948.svg"
MN["US 1948"].name = MN.US.name
MN["US 1948"].link = MN.US.link
MN["US 1961"].name = MN.US.name
MN["US 1961"].link = MN.US.link
MN["US-Bus"].link = MN.US.base .. " Business" .. suffix
MN.MN = {
shield = {
hook = "split",
split = 100,
above = "MN-%route% wide.svg",
below = "MN-%route%.svg"
},
name = "Trunk Highway %route%",
link = "Minnesota State Highway %route% [dab|| (%dab%)|]",
abbr = "MN %route%",
width = "expand"
}
MN.TH = MN.MN
MN["MN-Bus"] = {
shield = "MN-%route% Business.svg",
name = "Trunk Highway %route% Business",
link = "Minnesota State Highway %route% Business",
abbr = MN.MN.abbr .. " Bus.",
bannersuffix = "green"
}
local CSAHshield = {
arg = "county",
default = "County %route% square.svg",
Anoka = "County %route% (MN).svg",
Benton = "County %route% (MN).svg",
["Blue Earth"] = "County %route% (MN).svg",
Brown = "County %route% (MN).svg",
Chisago = "County %route% (MN).svg",
Clearwater = "County %route% (MN).svg",
Cook = "County %route% square.svg",
Cottonwood = "County %route% (MN).svg",
Dakota = "County %route% (MN).svg",
Fillmore = "County %route% (MN).svg",
Freeborn = "County %route% (MN).svg",
Goodhue = "County %route% (MN).svg",
Hennepin = "County %route% (MN).svg",
Isanti = "County %route% (MN).svg",
Kittson = "County %route% (MN).svg",
Lincoln = "County %route% (MN).svg",
Martin = "County %route% (MN).svg",
Mower = "County %route% (MN).svg",
Murray = "County %route% (MN).svg",
Nicollet = "County %route% (MN).svg",
Nobles = "County %route% (MN).svg",
Pennington = "County %route% (MN).svg",
Pope = "County %route% (MN).svg",
Ramsey = "County %route% (MN).svg",
["Red Lake"] = "County %route% (MN).svg",
Redwood = "County %route% (MN).svg",
["St. Louis"] = "County %route% (MN).svg",
Scott = "County %route% (MN).svg",
Stearns = "County %route% (MN).svg",
Washington = "County %route% (MN).svg",
Watonwan = "County %route% (MN).svg",
Wright = "County %route% (MN).svg",
["Yellow Medicine"] = "County %route% (MN).svg"
}
MN.CSAH = {
shield = CSAHshield,
shieldmain = {
arg = "county",
Anoka = "%county% County %route%.svg",
Hennepin = "%county% County %route%.svg",
default = {
ifexists = true,
default = "%county% County %route% MN.svg",
otherwise = "County %route% MN.svg"
}
},
name = "County State-Aid Highway %route%",
link = {
ifexists = true,
default = "County State-Aid Highway %route% ([county||%county% County, |]Minnesota)",
otherwise = ""
},
abbr = "CSAH %route%",
bannersuffix = {
hook = "match",
entry = "shield",
actions = {
-- %S+ represents a nonempty sequence of characters containing no spaces.
-- Also need to escape parentheses and dot with %.
["County %S+ %(MN%)%.svg"] = "county"
}
},
width = {
hook = "match",
entry = "shield",
actions = {
-- %S+ represents a nonempty sequence of characters containing no spaces.
-- Also need to escape parentheses and dot with %.
["County %S+ %(MN%)%.svg"] = "expand"
}
}
}
local CRshield = {
arg = "county",
default = "County %route% square.svg",
Anoka = "County %route% (MN).svg",
["Blue Earth"] = "County %route% (MN).svg",
Cook = "County %route% (MN).svg",
Hennepin = "County %route% (MN).svg",
Mower = "County %route% (MN).svg",
Murray = "County %route% (MN).svg",
Ramsey = "County %route% (MN).svg",
["Red Lake"] = "County %route% (MN).svg",
Inter = "Inter County Route %route% MN.svg"
}
MN.CR = {
shield = CRshield,
shieldmain = MN.CSAH.shieldmain,
name = {
arg = "county",
default = "County Road %route%",
Inter = "Inter-County Road %route%"
},
link = {
ifexists = true,
default = "County Road %route% ([county||%county% County, |]Minnesota)",
otherwise = ""
},
abbr = {
arg = "county",
default = "CR %route%",
Inter = "Inter-County %route%"
},
bannersuffix = {
arg = "county",
Inter = "county",
default = {
hook = "match",
entry = "shield",
actions = {
-- %S+ represents a nonempty sequence of characters containing no spaces.
-- Also need to escape parentheses and dot with %.
["County %S+ %(MN%)%.svg"] = "county"
}
}
},
width = {
hook = "match",
entry = "shield",
actions = {
-- %S+ represents a nonempty sequence of characters containing no spaces.
-- Also need to escape parentheses and dot with %.
["County %S+ %(MN%)%.svg"] = "expand"
}
}
}
for _,year in ipairs({"1920", "1934", "1948", "1968", "1975"}) do
MN["MN " .. year] = {
shield = format("MN-%%route%% (%s).svg", year),
shieldmain = format("MN-%%route%% (%s).svg", year),
name = MN.MN.name,
link = MN.MN.link,
abbr = MN.MN.abbr,
width = "square",
}
end
MN["MN 1920"].link = "Minnesota State Highway %route% [dab|| (%dab%)|(1920)]"
MN["MN 1920"].abbr = "TH %route%"
MN["MN 1934"]. abbr = MN["MN 1920"].abbr
MN["MN 1975"].shield = "MN-%route%.svg"
MN["MN 1975"].shieldmain = "MN-%route%.svg"
MN.IL = {alias = {module = "USA/IL", type = "IL"}}
MN.IA = {alias = {module = "USA/IA", type = "IA"}}
MN.ND = {alias = {module = "USA/NE", type = "ND"}}
MN.SD = {alias = {module = "USA/SD", type = "SD"}}
MN.WI = {alias = {module = "USA/WI", type = "WI"}}
MN.MB = {alias = {module = "CAN/MB", type = "Hwy"}}
MN.ON = {alias = {module = "CAN/ON", type = "Hwy"}}
-- The below are for linking internally on 'List of Minnesota state highways serving state institutions'
MN.MN2 = { shield = MN.MN.shield,
link = "#State Highway %route%",
abbr = MN.MN.abbr}
MN.MN75 = { shield = MN["MN 1975"].shield,
link = "#State Highway %route%",
abbr = MN.MN.abbr}
MN.MN48 = { shield = MN["MN 1948"].shield,
link = "#State Highway %route%",
abbr = MN.MN.abbr}
return MN