More actions
Documentation for this module may be created at Module:Road data/strings/USA/MN/doc
--[==[
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)"
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.law = "<span class='plainlinks'>[https://www.revisor.mn.gov/statutes/cite/161.%section%#stat.161.%section%.%subsection% MS § 161.%section%[subsection||(%subsection%)|]]</span>"
for k, v in pairs(MN) do if k:find ("^I") then
v.link = MN.I.link
end
end
MN["I-Alt"].link = "Interstate %route% Alternate (Minnesota)"
MN.BL.link = MN.I.base .. " Business" .. suffix
MN.US.name = "U.S. Highway %route%"
MN.US.link = "U.S. Route %route% in Minnesota"
MN.US.law = MN.I.law
for k, v in pairs(MN) do if k:find ("^US %d") then
v.name = MN.US.name
v.link = MN.US.link
end
end
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Old", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = MN[" aux "][auxType]
for k, v in pairs(MN) do if k:find (auxType) then if k:find ("^US") then
v.name = MN.US.name .. " " .. spec.name
v.link = MN.US.base .. " " .. spec.name .. suffix
end
end
end
end
MN["US 1961"].shield = "US %route% (MN 1961).svg"
MN["US-Old"].shield = MN["US 1961"].shield
MN["US-Old"].link = "Old " .. MN.US.base .. suffix
MN["US-Old"].abbr = "Old " .. MN.US.abbr
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",
law = MN.I.law
}
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"
}
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"
-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(MN) do if k:find ("^%a") then
v.maint = "[[Minnesota Department of Transportation|MnDOT]]"
v.browse = "Minnesota Trunk Highways"
v.browselinks = {
[1] = "[[List of Interstate Highways in Minnesota|Interstate]]",
[2] = "[[List of U.S. Highways in Minnesota|US]]",
[3] = "[[List of state highways in Minnesota|State]]",
[4] = "[[Legislative route (Minnesota)|Legislative routes]]"
}
end
end
local CSAHshield = {
arg = "county",
default = "County %route% square.svg",
Anoka = "County %route% (MN).svg",
Beltrami = "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"
}
},
maint = "",
browse = "[[County roads in Minnesota|County roads of Minnesota]]",
browselinks = {
[1] = "[[List of Inter-County Highways in Minnesota|Inter-County Highways]]",
[2] = "[[County roads in %county% County, Minnesota|%county% County]]"
}
}
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 = MN.CSAH.width,
browse = MN.CSAH.browse,
browselinks = MN.CSAH.browselinks
}
MN.Inter = {
shield = "Inter County Route %route% MN.svg",
name = "Inter-County Road %route%",
link = "List of Inter-County Highways in Minnesota",
abbr = "Inter-County %route%",
bannersuffix = "county",
maint = "",
browse = "[[County roads in Minnesota|County roads of Minnesota]]",
browselinks = {
[1] = "[[List of Inter-County Highways in Minnesota|Inter-County Highways]]",
}
}
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