Jump to content

Module:Road data/strings/USA/IA

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fredddie (talk | contribs) at 10:31, 16 September 2021 (Restored revision 1044016658 by Fredddie (talk)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

--[==[
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"]`.
]==]

-- Iowa
local IA = {}

local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(IA, require("Module:Road data/strings/USA"))

local suffix = " ([dab||%dab%, |]Iowa)"
local maint = "[[Iowa Department of Transportation|Iowa DOT]]"

IA.common = {
	location = {
		["first-label"] = "State",
		["first-data"] = "[[Iowa]]",
		["second-label"] = "Counties",
	},
	browse = "[[Iowa Primary Highway System]]",
	browselinks = {
		[1] = "[[List of Interstate Highways in Iowa|Interstate]]",
		[2] = "[[List of U.S. Highways in Iowa|U.S.]]",
		[3] = "[[List of Iowa state highways|State]]",
		[4] = "[[County roads in Iowa|Secondary]]",
		[5] = "[[Iowa Scenic Byways|Scenic]]"
	}
}

IA.I.maint = maint
IA.I.link = {
	["129"] = "Interstate 129",
	["280"] = "Interstate 280 (Iowa–Illinois)",
	["480"] = "Interstate 480 (Nebraska–Iowa)",
	["680"] = "Interstate 680 (Nebraska–Iowa)",
	default = {
		hook = "splitlen",
		split = 3,
		above = "Interstate %route% (Iowa)",
		below = "Interstate %route% in Iowa"
	}
}
IA.I.browse = IA.common.browse
IA.I.browselinks = IA.common.browselinks
                           
IA["I-Express"] = {	
	shield = IA.I.shield,	
	shieldmain = IA.I.shieldmain,
	name = IA.I.name .. " Express",
	link = IA.I.link,
	abbr = IA.I.abbr .. " Express",
	banner = "Express plate yellow.svg",
	width = "expand",
	bannersuffix = "blue",
	browse = IA.I.browse,
	browselinks = IA.I.browselinks,
	nbrowse = IA.I.nbrowse,
	nbrowselinks = IA.I.nbrowselinks
}
                           
IA["I-Local"] = {	
	shield = IA.I.shield,	
	shieldmain = IA.I.shieldmain,
	name = IA.I.name .. " Local",
	link = IA.I.link,
	abbr = IA.I.abbr .. " Local",
	banner = "Local plate yellow.svg",
	width = "expand",
	bannersuffix = "blue",
	browse = IA.I.browse,
	browselinks = IA.I.browselinks,
	nbrowse = IA.I.nbrowse,
	nbrowselinks = IA.I.nbrowselinks
}

IA.BL.name = IA.I.name .. " Business Loop"
IA.BL.link = IA.I.base .. " Business" .. suffix
IA.BL.abbr = IA.I.abbr .. " Business Loop"
IA.BL.browse = IA.I.browse
IA.BL.browselinks = IA.I.browselinks

IA["I 1957"].link = IA.I.link
IA["I 1961"].link = IA.I.link           

IA.US.name = "U.S. Highway %route%"
IA.US.maint = maint
IA.US.link = {["32"] = "U.S. Route 6 in Iowa",
                 ["55"] = "U.S. Route 55",
                 ["151"] = "U.S. Route 151",
                 ["161"] = "U.S. Route 161",
                 ["163"] = "Iowa Highway 163",
                 ["218"] = "U.S. Route 218",
                 ["275"] = "U.S. Route 275",
                 default = "U.S. Route %route% in Iowa"}
IA.US.browse = IA.common.browse
IA.US.browselinks = IA.common.browselinks

for _,year in ipairs({"1926", "1948", "1961"}) do
	IA["US " .. year] = {
		shield = format("US %%route%% (%s).svg", year),
		shieldmain = format("US %%route%% Iowa %s.svg", year),
		base = IA.US.base,
		name = IA.US.name,
		link = IA.US.link,
		abbr = IA.US.abbr,
		width = "square",
		browse = IA.US.browse,
		browselinks = IA.US.browselinks,
		nbrowse = IA.US.nbrowse,
		nbrowselinks = IA.US.nbrowselinks
	}
end
IA["US 1961"].shieldmain = "US %route% (1961).svg"

for _,type in ipairs({'US', 'US 1961'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
		local spec = IA[" aux "][auxType]
		IA[type .. "-" .. auxType] = {
			shield = IA['US 1961'].shield,
			shieldmain = IA['US 1961'].shieldmain,
			name = IA[type].name .. " " .. spec.name,
			link = "U.S. Route %route% " .. spec.name .. suffix,
			abbr = IA[type].abbr .. " " .. spec.name,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = square,
			browse = IA.US.browse,
			browselinks = IA.US.browselinks,
			nbrowse = IA.US.nbrowse,
			nbrowselinks = IA.US.nbrowselinks
		}
	end
end
                 
IA["US-Hist"].link = IA.US.link
IA["US-Hist"].abbr = "Historic " ..IA.US.abbr
IA["US-Hist"].browse = IA.US.browse
IA["US-Hist"].browselinks = IA.US.browselinks

IA["US 1926-City"] = {
	shield = "US %route% City 1926.svg",
	name = "City " .. IA.US.name,
	link = IA.US.base .. " City" .. suffix,
	abbr = "City " .. IA.US.abbr,
	browse = IA.US.browse,
	browselinks = IA.US.browselinks,
	nbrowse = IA.US.nbrowse,
	nbrowselinks = IA.US.nbrowselinks
}
IA["US 1948-City"] = IA["US 1926-City"]

IA["US-City-Bus"] = {
	shield = "City Route %route%.svg",
	name = IA["US-Bus"].name,
	link = IA["US-Bus"].link,
	abbr = IA["US-Bus"].abbr,
	browse = IA.US.browse,
	browselinks = IA.US.browselinks,
	nbrowse = IA.US.nbrowse,
	nbrowselinks = IA.US.nbrowselinks
}

IA["US 1971"] = IA["US 1961"]
                 
IA.IA = {
	base = "Iowa Highway %route%",
	shield = {
		hook = "splitlen",
		split = 2,
		above = "Elongated circle %route%.svg",
		below = "Circle sign %route%.svg"
	},
	name = "Iowa Highway %route%",
	link = "Iowa Highway %route%" .. IA[" dab "],
	abbr = "Iowa&nbsp;%route%",
	maint = maint,
	width = "expand",
	browse = IA.common.browse,
	browselinks = IA.common.browselinks
}

for _,type in ipairs({"IA"}) do
	for _,year in ipairs({"1926", "1948", "1961", "1980"}) do
		IA["IA " .. year] = {
			shield = format("Iowa %%route%% (%s).svg", year),
			shieldmain = format("Iowa %%route%% (%s).svg", year),
			name = IA.IA.name,
			link = IA.IA.link,
			abbr = IA.IA.abbr,
			width = "square",
			browse = IA.common.browsebrowse,
			browselinks = IA.common.browselinks
		}
	end
end

IA["IA 1926"].shield = "Iowa %route% 1926.svg"
IA["IA 1926"].shieldmain = "Iowa %route% 1926.svg"

IA["IA 1980"].shield = {
	hook = "between",
	lower = 10,
	upper = 100,
	yes = "Elongated circle %route%.svg",
	no = "Circle sign %route%.svg"
}
IA["IA 1980"].shieldmain = IA["IA 1980"].shield

IA["IA 1961"].shield = {
	hook = "splitlen",
	split = 3,
	above = "Circle sign %route% (small).svg",
	below = {
		hook = "splitlen",
		split = 2,
		above = "Elongated circle %route%.svg",
		below = "Circle sign %route%.svg"
		}
	}
IA["IA 1961"].shieldmain = IA["IA 1961"].shield

IA["IA-Bus"] = {
	shield = IA["IA 1980"].shield,
	shieldmain = IA["IA 1980"].shield,
	name = "Iowa Highway %route% Business",
	link = "Iowa Highway %route% Business [dab||(%dab%)|]",
	abbr = IA.IA.abbr.." Business",
	banner = "Business plate.svg",
	width = "square",
	browse = IA.common.browsebrowse,
	browselinks = IA.common.browselinks
}

IA.AOTS = {
	shield = "Elongated circle 27.svg",
	shieldmain = "Elongated circle 27.svg",
	name = "Avenue of the Saints",
	link = "Avenue of the Saints",
	abbr = "Iowa&nbsp;27",
	banner = "Avenue of the Saints banner.svg"
}

IA.CR.link = {
	["105"] = "Iowa Highway 105",
	["99"] = "Iowa Highway 99",
	["X99"] = "Iowa Highway 99",
	default = {
		ifexists = true,
		default = "County Road %route% (%county% County, Iowa)"
	}
}
IA.CR.browse = "Secondary roads in Iowa"

IA.Primary = {
	shield = "Iowa Primary %route%.svg",
	shieldmain = "Iowa Primary %route%.svg",
	name = "Primary Road No. %route%",
	link = "Iowa Primary Road No. %route%",
	abbr = "No. %route%",
	width = "37",
	browse = IA.common.browse,
	browselinks = IA.common.browselinks
}

IA.Registered = {
	shield = "%route% pole.png",
	name = "%route%",
	link = "%route%",
	abbr = "%route%",
	orientation = "upright",
	browse = IA.common.browse,
	browselinks = IA.common.browselinks
}

IA.Lincoln.link = "Lincoln Highway in Iowa"
IA.Lincoln.abbr = "Lincoln Highway Heritage Byway"
IA.Jefferson.abbr = "Jefferson Highway Heritage Byway"
          
IA.IL = {alias = {module = "USA/IL", type = "IL"}}
IA.MN = {alias = {module = "USA/MN", type = "MN"}}
IA.MO = {alias = {module = "USA/MO", type = "MO"}}
IA.NE = {alias = {module = "USA/NE", type = "NE"}}
IA.SD = {alias = {module = "USA/SD", type = "SD"}}
IA.WI = {alias = {module = "USA/WI", type = "WI"}}

return IA