Module:Road data/strings/USA/NY
This module is used to store type data for use with several road templates, including {{jct}} and {{routelist row}}. Background information and a summary of the syntax are listed below.
Exported types
This modules exports the following types:
ADHS
, Back Country
, BCB
, BL
, BL 1957
, BLBS
, BRP
, BS
, BS 1957
, Byway
, CR
, CR-Old
, CR-Truck
, CT
, Dixie
, FFH
, FH
, FH-named
, FR
, FSB
, Future
, GRR
, GRR-Spur
, GSP
, I
, I 1957
, I 1961
, I 1971
, I-Alt
, I-Express
, I-Future
, I-Local
, I-named
, I-Spur
, I-Temp
, I-Temporary
, I-Toll
, I-Truck
, I-VT
, ILR
, ISTEA
, Jefferson
, LCT
, Lincoln
, LSEX
, MATP
, Mormon
, National
, NER
, NFSB
, NHS
, NJ
, Npkwy
, NSB
, NTP
, NY
, NY 1927
, NY 1948
, NY 1955
, NY 1960
, NY-Alt
, NY-Bus
, NY-Byp
, NY-Spur
, NY-Truck
, NYBC
, NYST
, ON
, PA
, Parkway
, Pkwy
, Post
, Postal
, QC-A
, Ref
, road
, SBR
, Scenic
, Skyline
, SR
, STE
, Tour
, Trail
, US
, US 1926
, US 1926-Alt
, US 1926-Bus
, US 1926-Byp
, US 1926-Conn
, US 1926-Opt
, US 1926-Scenic
, US 1926-Spur
, US 1926-Temp
, US 1926-Truck
, US 1948
, US 1948-Alt
, US 1948-Bus
, US 1948-Byp
, US 1948-Conn
, US 1948-Opt
, US 1948-Scenic
, US 1948-Spur
, US 1948-Temp
, US 1948-Truck
, US 1961
, US 1961-Alt
, US 1961-Bus
, US 1961-Byp
, US 1961-Conn
, US 1961-Opt
, US 1961-Scenic
, US 1961-Spur
, US 1961-Temp
, US 1961-Truck
, US 1971
, US-Alt
, US-Bus
, US-Byp
, US-City
, US-Conn
, US-Detour
, US-Emerg
, US-Future
, US-Hist
, US-named
, US-Old
, US-Opt
, US-Scenic
, US-Spur
, US-Temp
, US-Toll
, US-Truck
, USBR
and VT
Syntax
Hierarchy and fields
At its most basic level, this module is a nested table of strings. At the top is the root table, named for the abbreviation of a country, state, or province. This table stores the type data for a particular place, which is named in the comment in the first line, and is returned at the end of the module. The table is composed of further tables, one per type. The basic syntax for a type table is:
place.type = { shield = "", name = "", link = "", abbr = "" }
The four main fields in a type table are shield
, name
, link
, and abbr
. Currently, these are the types used by all countries. By convention, they are always specified, using an empty string "",
if there is no value.
shield
determines the shield that is displayed, if anyname
specifies the name of the route displayed by an infoboxlink
specifies the target of a link generated, if anyabbr
determines the displayed abbreviation.
Other common fields in road data tables
shieldmain
is used when a different shield is desired at the top of an infobox, such as for county roads.
USA.CR = { shield = "CR %route% jct.svg", shieldmain = "[county||%county% |]County %route%.svg", name = "County Road %route%", link = "", abbr = "CR %route%" }
shieldlist
is used when a different shield is desired in lists that utilize the {{Routelist row}} series of templates.
base
can be used for aliasing different types that have a similar base structure, such as U.S. Highway special routes.
banner
stores the name of the special route plate, such asBusiness plate.svg
. Can be omitted when unused.width
stores a code representing the width of the shield. It is most often helpful when used withbanner
. Can be omitted entirely when unused; common values aresquare
andexpand
.
section
stores the specific section number for those routes that are defined by law.
translation
specifies the native language name of the route displayed by an infoboxlang
is the ISO 639-2 code of the native language; this code is used by {{Lang}} and {{Lang-xx}}.
PER.RN = { shield = "PE-%route% route sign.svg", name = "National Route %route%", link = "Peru Highway %route%", abbr = "PE-%route%", translation = "Ruta nacional %route%", lang = "es-pe" }
Once a type is defined, it can be referenced later in the code. As seen here, it is common to define all parameters for main types like US
and then to use aliases for subtypes such as US-Alt
.
MO.US = { shield = "US %route%.svg", base = "U.S. Route %route%", link = "U.S. Route %route% in Missouri", abbr = "US %route%", width = "expand" } MO["US-Alt"] = { shield = MO.US.shield, link = MO.US.base .. " Alternate ([dab||%dab%, |]Missouri)", abbr = MO.US.abbr .. " Alt.", banner = "Alternate plate.svg", width = "expand" }
Parser arguments
When the parser function of Module:Road data/parser is called, it is passed up to three parameters. The second one is the field to parse, and the last one is a rarely-used option designed for multiple-shield types. The first and most important parameter is a table of arguments collected by the calling module, which generally includes the state, country, or both; the type and number of the route; and a few miscellaneous arguments. This table of arguments forms the basis of the parser's format string syntax.
The table accessible by the strings includes the following entries by default:
state
: The state or province the route is located in.country
: The country the route is located in. If the country is not passed by the calling module, the parser will attempt to include it.
The above entries are primarily used to find the string module itself, so they should not be a concern for module writers.
type
: The type of the route. This determines the entry of the root table that is used by the parser.route
: The route "number". This is easily the most important argument for module writers.
The following entries are used less often:
county
: The county the route is located in. This is usually used for county routes in the United States.township
: This entry is similar in function and utility to thecounty
entry.dab
: A tag used to disambiguate the link target. This is mostly used for bannered routes in the United States.denom
: This rare entry is used exclusively for West Virginia county routes.
Parser hooks, which will be described later, can add entries to this table that may be used by strings.
Basic string syntax
The most basic value that can be used for most type table fields is a specially formatted string, which will be referred to in this documentation as a format string. This is the string that will ultimately be parsed and returned by the parser. A format string is an ordinary string object. The power of these strings comes in the form of two special instructions that are recognized by the parser.
The first is anything in %argument%
form. The parser will replace such a statement with the value of the argument
entry in the arguments table described earlier. This is what allows the route number to be spliced into a shield or link name.
The second special string is in the form of [arg|equals|then|else]
. This functions as a rudimentary if-then-else statement. The parser tests the value of arg
to see if it is equal to the value specified in equals
. equals
may be empty, in which case the parser tests the existence of the arg
argument. If the result of the test is true, the statement is replaced with the value of the then
block. Otherwise, it is replaced with the value of the else
block.
The two statements may be combined. The parser will parse the if-then-else statement first, and then perform the argument inclusion. This combination is commonly used with bannered routes in the United States, where the dab
argument is tested and the link disambiguation is adjusted accordingly, as follows:
AL["US-Bus"] = { shield = "US %route%.svg", link = "U.S. Route %route% Business ([dab||%dab%, |]Alabama)", abbr = "US-%route% Bus.", banner = "Business plate.svg", width = "expand" }
When parsing the link
field, the parser first checks to see if the dab
argument was provided. If so, it replaces the statement with %dab%,
. If not, the statement is replaced with the empty string placed in the else
block. Then, the parser replaces %route%
with the route number and, if the dab
argument was provided, %dab%
with the value of that argument.
Switching
Some logic is too complicated to represent with only format strings. This framework provides several methods to express complex data. All of these involve storing a nested table as the value of a field.
The most straightforward functionality provided by nested tables is switching. In its most basic form, the table consists of a series of key-value pairs, with the keys being route numbers and the values being the format strings used by those routes. Usually, the format string returned does not need parsing, but the option is there. A default
entry should be provided to handle any route numbers not explicitly stated. The following is a representative example of route-based switching (from Module:Road data/strings/USA/AR):
AR.AR = { shield = { default = "Arkansas %route%.svg", ["917"] = "Arkansas 917-1.svg", ["980"] = "Arkansas 980(Airport).svg" }, link = "Arkansas Highway %route% [dab||(%dab%)|]", abbr = "Hwy. %route%", width = "expand" }
In this example, Highways 917 and 980 have non-standard shield names, which are explicitly provided. Other route numbers use the default format.
Switching on other arguments is also allowed. The name of the argument to be used for switching is stated in the arg
field of the table. Nesting switches on different arguments is also allowed. A good example that uses both forms of switching can be found in Ontario:
local regionalShields = { arg = "county", ["Essex"] = "Essex County Road %route%.png", ["York"] = "York Regional Road %route%.svg", ["Durham"] = "Durham Regional Road %route%.svg", ["Niagara"] = "Niagara Regional Road %route%.svg", ["Simcoe"] = { ["52"] = "Simcoe county road 52.png", default = "Simcoe County Road %route%.JPG" } }
In this example, which is a shield table that is reused by several types in Ontario, the county
argument is used for the primary switch. If the route is in Simcoe County, a second switch is performed, this time on the route number.
Existence testing
Another use for tables is existence testing. If a table has the ifexists
field set to true
, the parser will perform existence testing on the result of parsing the default
field. If the test fails, the result of parsing the otherwise
field is returned. Existence testing may be chained by using a second ifexists table as the value of the first table's otherwise
field, and so on. Here's an example of nested existence testing (from Module:Road data/strings/GBR):
GBR.B = { shield = { ifexists = true, default = "UK road B%route%.svg", otherwise = { ifexists = true, default = "UK road B%route%.png" } }, link = "", abbr = "B%route%" }
Hooks
Due to technical limitations, these string modules cannot contain functions. Rather than force functionality into the string framework, the parser can call functions in a separate hooks module. The functions in this module, Module:Road data/parser/hooks, are more-or-less fully functional functions. The exact functionalities of these hooks are beyond the scope of this documentation. Descriptions of these hooks may be found on their documentation page.
Generally speaking, a hook is called by setting the hook
field in a table as equal to the name of a hook. Hooks receive two arguments, both tables: parameters
, which is the table in the definition; and args
, which is simply the table of arguments normally passed to the parser. The hook returns a string, which is then parsed as usual. A powerful feature of hooks is that they can add arbitrary values to the argument table, which may be referenced in the string returned by the hook. Generally, the format string returned by the hook is specified in some form by the default
field of the table, though there are exceptions. Here is an example of a hook (from Module:Road data/strings/MEX):
MEX.SH = { shield = { ifexists = true, arg = "state", SON = "HIGHWAYSON %route%.jpg", NLE = "Nuevo Leon State Highway %route%.PNG", default = "" }, link = { hook = "mask", mask = "Road data/masks/MEX", base = "state", masked = "fullstate", default = "%fullstate% State Highway %route%" }, abbr = "SH %route%" }
In this example, the parser will process the link by calling the mask
hook. In short, this hook takes the argument referenced in base
, passes it through the mask module specified in mask
, and stores it in the field in the arguments noted in masked
. The hook returns the string given in default
, which has access to the fullstate
argument added by the hook.
Other functionality
Functionality exists to display multiple shields for one route, which is used to display tolled and free shields for routes where they differ. This is done by supplying a table with two values, which are listed without indices. The parser is called twice by the calling module, and it returns one shield per call. An example may be found in Texas:
TX.Both = { shield = {"Texas %route%.svg", "Toll Texas %route% new.svg"}, link = "Texas State Highway %route%", abbr = "SH %route%", width = 40 }
Structure
Each country has its own module. In the United States and Canada, each state/territory/province also has its own module. Each module begins with a comment stating the name of the country or state, followed by the root table declaration, as follows (from Module:Road data/strings/USA/AS):
-- American Samoa local AS = {}
The root table is named based on the established abbreviation for the country or state, which is the same as the abbreviation used in the module title. This table stores the various types used in that particular place. Most of the remaining code in the module defines these various types. The module ends by returning the root table:
return AS
Aliasing
There are two ways to define a type as an alias. If the type is defined within the module, simply set the new type as equal to the type being aliased, as shown above (from Module:Road data/strings/HKG):
HKG.Route = { shield = "HK Route%route%.svg", link = "Route %route% (Hong Kong)", abbr = "Route %route%" } HKG.route = HKG.Route
If the type is defined in a separate module, such as a state highway type being used in another state's module, a special syntax may be used to refer to that module (from Module:Road data/strings/USA/NJ):
NJ.NY = {alias = {module = "USA/NY", type = "NY"}}
This code sets the NY
type as a link to the NY
type in Module:Road data/strings/USA/NY. The parser will import that module and process the type as if the original module had declared it itself. The alias declaration may not add or override any data in the type table it points to.
Inheriting types
It is possible to predefine several types for a location by inheriting them from another module. In this example, the module for Albania inherits all of the specified types from the Europe module.
-- Albania local ALB = {} local util = require("Module:Road data/util") util.addAll(ALB, require("Module:Road data/strings/EUR"))
Only one module may be inherited at this time.
Advanced uses
It is possible to create multiple types based on a specified pattern using ipairs
. In this example from Module:Road data/strings/USA/WA, the US 1926
, US 1948
, and US 1961
types are all created from the same code. At the bottom that is an override for US 1961
's shieldmain
.
for _,year in ipairs({"1926", "1948", "1961"}) do WA["US " .. year] = { shield = format("US %%route%% (%s).svg", year), shieldmain = format("US %%route%% Washington %s.svg", year), base = WA.US.base, name = WA.US.name, link = WA.US.link, abbr = WA.US.abbr, width = "square", } end WA["US 1961"].shieldmain = "US %route% (1961).svg"
Similarly, subtypes can be created in the same manner. This example creates 9 subtypes each for WA
and SR
. The aux
is inherited from Module:Road data/strings/USA. That, in turn, modifies auxType
and spec
accordingly.
for _,type in ipairs({'WA', 'SR'}) do for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do local spec = WA[" aux "][auxType] WA[type .. "-" .. auxType] = { shield = WA[type].shield, shieldmain = WA[type].shieldmain, name = WA[type].name .. " " .. spec.name, link = WA[type].link .. " " .. spec.name .. suffix, abbr = WA[type].abbr .. " " .. spec.abbrsuffix, banner = spec.bannerprefix .. " plate.svg", aux = spec.aux, width = WA[type].width } end end
Style
There are a few style guidelines that should be followed:
- Align table fields using tabs. All tables should be aligned so that fields line up with each other, as shown in the above examples.
- Each table field should be on its own line.
- Add spaces to either side of an assignment operator (equals sign).
- Leave a blank line between types. Type aliases should be set off from their base type by a blank line, but no blank lines should be placed between the aliases themselves.
--[==[
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"]`.
]==]
-- New York
local NY = {}
local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(NY, require("Module:Road data/strings/USA"))
local suffix = " ([dab||%dab%, |]New York)"
NY.I.link = "Interstate %route% (New York)"
for k, v in pairs(NY) do if k:find ("^I") then
v.link = NY.I.link
end
end
NY.BL.link = "Interstate %route% Business ([dab||%dab%, |]New York)"
for k, v in pairs(NY) do if k:find ("^BL") then
v.link = NY.BL.link
end
end
NY.US.shield = {
["1-9"] = "US 1-9.svg",
["9W"] = "US 9W (NY).svg",
default = {
hook = "splitlen",
split = 3,
above = "US %route% (NY).svg",
below = "US %route%.svg"
}
}
NY.US.shieldmain = NY.US.shield
NY.US.link = "U.S. Route %route% in New York"
for k, v in pairs(NY) do if k:find ("^US %d") then
v.name = NY.US.name
v.link = NY.US.link
end
end
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = NY[" aux "][auxType]
for k, v in pairs(NY) do if k:find (auxType) then if k:find ("^US") then
v.shield = NY.US.shield
v.shieldmain = NY.US.shieldmain
v.link = NY.US.base .. " " .. spec.name .. " ([dab||%dab%, |]New York)"
end
end
end
end
for _,year in ipairs({'1926', '1948', '1961'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local type = "US " .. year
local spec = NY[" aux "][auxType]
NY[type .. "-" .. auxType] = {
shield = NY[type].shield,
shieldmain = NY[type].shieldmain,
name = NY[type].name .. " " .. spec.name,
link = NY[type].base .. " " .. spec.name .. suffix,
abbr = NY[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate " .. year .. ".svg",
aux = spec.aux,
width = NY[type].width
}
end
end
NY.NY = {
base = "New York State Route %route%",
shield = "NY-%route%.svg",
shieldmain = {
["74"] = {"NY-%route%.svg", "Vermont %route%.svg"},
["149"] = {"NY-%route%.svg", "Vermont %route%.svg"},
["295"] = {"NY-%route%.svg", "MA Route %route%.svg"},
["313"] = {"NY-%route%.svg", "Vermont %route%.svg"},
["314"] = {"NY-%route%.svg", "Vermont %route%.svg"},
["343"] = {"NY-%route%.svg", "Connecticut Highway %route% wide.svg"},
["346"] = {"NY-%route%.svg", "Vermont %route%.svg"},
default = "NY-%route%.svg"
},
name = {
["74"] = "Route %route%",
["149"] = "Route %route%",
["295"] = "Route %route%",
["313"] = "Route %route%",
["314"] = "Route %route%",
["343"] = "New York State Route %route% and<br>Connecticut Route %route%",
["346"] = "Route %route%",
default = "New York State Route %route%"
},
link = "New York State Route %route% [dab||(%dab%)|]",
abbr = "NY %route%",
width = "expand"
}
NY.SR = NY.NY
NY.Ref = { --Reference routes
shield = "",
shieldlist = "No image.svg",
name = NY.NY.name.default,
link = NY.NY.link,
abbr = NY.NY.abbr
}
for _,year in ipairs({"1927", "1948", "1955", "1960"}) do
NY["NY " .. year] = {
shield = format("NY-%%route%% (%s).svg", year),
name = NY.NY.name.default,
link = NY.NY.link,
abbr = NY.NY.abbr,
width = "square",
}
end
for _,type in ipairs({'NY'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Truck"}) do
local spec = NY[" aux "][auxType]
NY["NY-" .. auxType] = {
shield = NY.NY.shield,
name = NY.NY.name.default .. " " .. spec.name,
link = NY.NY.base .. " " .. spec.name .. NY[" dab "],
abbr = NY.NY.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end
local pkwys = {
-- link-suffix => parkways
-- Do not list "Parkway" link-suffix.
[""] = {
["Bronx River NYC"] = "Bronx River Parkway",
["Saw Mill"] = "Saw Mill River Parkway",
["Robert Moses Cswy"] = "Robert Moses Causeway"
},
Drive = {
["FDR"] = "Franklin D. Roosevelt East River",
"Harlem River",
"Seven Lakes"
},
["Interstate Parkway"] = {
"Palisades"
},
Road = {
"Arden Valley",
"Tiorati Brook"
},
["State Parkway"] = {
"Bear Mountain",
"Caumsett",
"Lake Ontario",
"Robert Moses",
"Taconic",
}
}
local pkwyShields = {
default = "%route% Pkwy Shield.svg",
Belt = "%route% Pkwy Shield free.svg",
["Bronx River NYC"] = "Bronx River Pkwy Shield free.svg",
["Cross Island"] = "%route% Pkwy Shield free.svg",
["FDR"] = "%route% Drive Shield free.svg",
["FDR Drive"] = "%route% Shield free.svg",
["Grand Central"] = "%route% Pkwy Shield free.svg",
["Harlem River"] = "%route% Drive Shield free.svg",
["Harlem River Drive"] = "%route% Shield free.svg",
["Henry Hudson"] = "%route% Pkwy Shield free.svg",
["Jackie Robinson"] = "%route% Pkwy Shield free.svg",
["Korean War Vets"] = "%route% Pkwy Shield free.svg",
Pelham = "%route% Pkwy Shield free.svg",
Bay = "",
["Long Mountain"] = ""
}
local pkwyAbbrs = {
-- link-suffix => abbr-suffix
["Interstate Parkway"] = "Parkway"
}
local pkwyLIPkwys = {
-- Parkways in Long Island that do not end with "State Parkway"
"Loop",
"Ocean",
"Robert Moses Cswy",
}
local pkwyLIStatePkwys = {
-- Parkways in Long Island that end with "State Parkway"
"Bethpage",
"Heckscher",
"Meadowbrook",
"Northern",
"Sagtikos",
"Southern",
"Sunken Meadow",
"Wantagh"
}
for _,pkwy in ipairs(pkwyLIStatePkwys) do
table.insert(pkwyLIPkwys, pkwy)
table.insert(pkwys["State Parkway"], pkwy)
end
local pkwyPIPPkwys = {
-- Parkways maintained by Palisades Interstate Park Commission
"Lake Welch",
"Palisades",
}
for _,pkwy in ipairs(pkwys.Road) do
table.insert(pkwyPIPPkwys, pkwy)
end
NY.Parkway = {
shield = pkwyShields,
name = {default = "%route% Parkway"},
link = {default = "%route% Parkway [dab||(%dab%)|]"},
abbr = {default = "%route% Parkway"},
width = {
default = 'square',
["Bear Mountain"] = 'wide',
["Cross County"] = 'wide',
["Saw Mill"] = 'wide',
["Sprain Brook"] = 'wide',
["Taconic State"] = 'wide'
},
bannersuffix = {
default = "green",
Belt = "",
["Bronx River NYC"] = "",
["Cross Island"] = "",
["FDR"] = "",
["FDR Drive"] = "",
["Garden State"] = "GSP",
["Grand Central"] = "",
["Harlem River"] = "",
["Harlem River Drive"] = "",
["Henry Hudson"] = "",
["Jackie Robinson"] = "",
["Korean War Vets"] = "",
["Merritt"] = "blue",
Pelham = "",
["Seven Lakes"] = "brown",
},
orientation = {
default = "",
Niagara = "upright",
}
}
for suffix,list in pairs(pkwys) do
local abbrSuffix = pkwyAbbrs[suffix] or suffix
for abbr,pkwy in pairs(list) do
if type(abbr) == "number" then abbr = pkwy end
if suffix == "" then
NY.Parkway.name[abbr] = pkwy
NY.Parkway.link[abbr] = pkwy
NY.Parkway.abbr[abbr] = pkwy
else
NY.Parkway.name[abbr] = pkwy .. " " .. suffix
NY.Parkway.link[abbr] = pkwy .. " " .. suffix
if abbrSuffix ~= "Parkway" then
NY.Parkway.abbr[abbr] = abbr .. " " .. abbrSuffix
end
end
end
end
for _,pkwy in ipairs(pkwyLIPkwys) do
NY.Parkway.bannersuffix[pkwy] = ""
end
for _,pkwy in ipairs(pkwyPIPPkwys) do
NY.Parkway.bannersuffix[pkwy] = "brown"
end
NY.SBR = {
shield = "US Bike %route% (M1-8).svg",
name = "New York State Bicycle Route %route%",
link = "New York State Bicycle Route System#State Bicycle Route %route%",
abbr = "State Bicycle Route %route%",
orientation = "upright"
}
NY.LSEX = {
shield = "LaSalle Expy.svg",
name = "LaSalle Expressway",
link = "LaSalle Expressway",
abbr = "LaSalle Expressway",
bannersuffix = "green"
}
NY.STE = {
shield = "Southern Tier Expressway.svg",
name = "Southern Tier Expressway",
link = "Southern Tier Expressway",
abbr = "Southern Tier Expressway",
bannersuffix = "green"
}
-- add new types above this line if you want it to have the state highway browse
for k, v in pairs(NY) do if k:find ("^%a") then
v.maint = "[[New York State Department of Transportation|NYSDOT]]"
end
end
for k, v in pairs(NY) do if k:find ("^%a+ %d") then
v.maint = "[[New York State Department of Highways|NYSDH]]"
end
end
NY.NYST = {
shield = "NYS Thruway Sign.svg",
name = "New York State Thruway",
link = "New York State Thruway",
abbr = "New York Thruway",
bannersuffix = "blue",
maint = "[[New York State Thruway Authority]]"
}
NY.NYBC = {
shield = "NYS Thruway Sign.svg",
name = "Berkshire Connector",
link = "Berkshire Connector",
abbr = "Berkshire Connector",
bannersuffix = "blue"
}
NY.CR.name = {
arg = "county",
default = "County Route %route%",
Fulton = "County Highway %route%"
}
NY.CR.shield = {
ifexists = true,
arg = "county",
default = "CR %route% jct.svg",
Albany = "CR %route% jct wide.svg",
Broome = {
hook = "splitlen",
split = 3,
below = "CR %route% jct.svg",
above = "CR %route% jct wide.svg"
},
Cayuga = "",
Columbia = {
["21C"] = "CR 21C jct wide.svg",
default = "CR %route% jct.svg"
},
Clinton = "CR %route% jct.svg",
Cortland = "",
Dutchess = {
hook = "splitlen",
split = 3,
below = "CR %route% jct.svg",
above = "CR %route% jct wide.svg"
},
Erie = "Erie County %route% NY.svg",
Franklin = "Franklin County %route% NY.svg",
Fulton = "CR %route% jct wide.svg",
Genesee = "",
Herkimer = "",
Monroe = "",
Montgomery = "",
Nassau = "",
Niagara = "",
Onondaga = {
["57"] = "CR 57 jct.svg",
default = ""
},
Oneida = {
["840"] = "CR 840 jct wide.svg",
default = "CR %route% jct.svg"
},
Ontario = "",
Orleans = "",
Schenectady = "",
Seneca = "",
Steuben = {
["333"] = "CR 333 jct wide.svg",
default = "CR %route% jct.svg"
},
Wayne = "",
Westchester = "",
Wyoming = "",
Yates = ""
}
NY.CR.shieldmain = {
ifexists = true,
arg = "county",
default = "%county% County %route%.svg",
Cayuga = "",
Cortland = "",
Erie = "Erie County %route% NY.svg",
Franklin = "Franklin County %route% NY.svg",
Genesee = "",
Herkimer = "",
Monroe = "",
Montgomery = "",
Nassau = "",
Niagara = "",
Onondaga = {
["57"] = "%county% County %route%.svg",
default = ""
},
Ontario = "",
Orleans = "",
Schenectady = "",
Seneca = "",
Wayne = "",
Westchester = "",
Wyoming = "",
Yates = ""
}
NY.CR.link = "County Route %route% (%county% County, New York)" --ifexist
NY.CR.width = {ifexists = true,
arg = "county",
default = "square",
Albany = "wide",
Columbia = {
["21C"] = "wide",
default = "square"
},
Erie = "16",
Fulton = "wide",
Oneida = {
["840"] = "wide",
default = "square"
},
Steuben = {
["333"] = "wide",
default = "square"
}
}
NY.CR.bannersuffix = {
arg = "county",
Franklin = "green"
}
NY.CR.browse = "[[County routes in New York|County Routes in New York]]"
NY.CR.browselinks = "[[List of county routes in %county% County, New York|County Routes in %county% County]]"
NY["CR-Truck"] = {
shield = NY.CR.shield,
link = NY.CR.link .. " Truck",
abbr = NY.CR.abbr .." Truck",
banner = "Truck plate county.svg",
browse = NY.CR.browse,
browselinks = NY.CR.browselinks
}
NY["CR-Old"] = {
shield = {
ifexists = true,
arg = "county",
default = "CR %route% jct.svg",
Cayuga = "",
Cortland = "",
Erie = "Erie County %route% NY.svg",
Franklin = "Franklin County %route% NY.svg",
Genesee = "",
Herkimer = "",
Monroe = "",
Montgomery = "",
Nassau = "Nassau County %route% NY.svg",
Niagara = "",
Ontario = "",
Orleans = "",
Schenectady = "",
Seneca = "",
Wayne = "",
Westchester = "",
Wyoming = "",
Yates = ""
},
name = NY.CR.name,
link = NY.CR.link,
abbr = NY.CR.abbr,
width = square,
bannersuffix = {
arg = "county",
Franklin = "green",
Nassau = "orange",
},
orientation = {
arg = "county",
Nassau = "upright",
},
browse = NY.CR.browse,
browselinks = NY.CR.browselinks
}
-- add new types above this line if you want it to have the state highway browse
for k, v in pairs(NY) do if k:find ("CR") then
v.maint = "%county% County Highway Department"
end
end
NY.ILR = {
shield = "Rochester Inner Loop.svg",
name = "Inner Loop",
link = "Inner Loop (Rochester)",
abbr = "Inner Loop",
width = "wide",
bannersuffix = "orange",
maint = ""
}
NY.GSP = {alias = {module = "USA/NJ", type = "GSP"}}
NY.CT = {alias = {module = "USA/CT", type = "CT"}}
NY.MATP = {alias = {module = "USA/MA", type = "MATP"}}
NY.NJ = {alias = {module = "USA/NJ", type = "NJ"}}
NY.PA = {alias = {module = "USA/PA", type = "PA"}}
NY.VT = {alias = {module = "USA/VT", type = "VT"}}
NY["I-VT"] = {alias = {module = "USA/VT", type = "I"}}
NY["QC-A"] = {alias = {module = "CAN/QC", type = "A"}}
NY.ON = {alias = {module = "CAN/ON", type = "ON"}}
return NY