Template:Infobox road is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Highways Template‑class | |||||||
|
If you set up a country to use this template, be sure to add it to this page. |
This template was nominated for
deletion. Please review the prior discussions if you are considering re-nomination:
|
|
||||||||
This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 6 sections are present. |
Are there any plans to convert parts of this infobox to Lua, specifically the shield, route name, and translation? Now that we have fairly robust road data modules, I think these three items should be handled by the road data modules. Yes, I know that these will eventually be handled by Wikidata, but who knows when that will happen? We can use Lua now.
For those locations that don't yet have a road data module, we could utilize a tracking category to catch them, but I don't think there are very many. – Fredddie ™ 16:01, 16 May 2015 (UTC)
Something that might be possible is to have Module:Infobox_road/length get the length from Wikidata, if available and not specified locally. I added length to [1] and we at least can use the same source for all US Interstate articles. Aude ( talk) 09:09, 9 October 2015 (UTC)
{{
Convert}}
was because we wanted it to appear <length><reference> (<conversion>). So long as that's preserved, there will be no opposition from the "it's always been that way" lobby. –
Fredddie
™ 13:02, 10 October 2015 (UTC)
For the past week, I have been converting this template into a Lua module. The sandbox now does not transclude templates, except for certain fallbacks where (1) arguments to the live template need to be changed (discussed in issues below), and (2) data are yet to be defined in road data modules. There was a lot of data movement, and I think I am at a point to request for comments on where I decided to put things.
The goal is to use road data modules as much as possible. For USA, the following data are to be moved to road data modules (see Module:Road data/strings/USA and Module:Road data/strings/USA/NH for examples of an updated modules):
shieldmain
: moved from
Template:Infobox road/shieldmain/USA to each state's road data module. Defaults to shield
if undefined.
shieldmainsize
: size for shieldmain
if it were to be displayed in {{
jct}}
. Defaults to shieldsize
if undefined.name
: moved from
Template:Infobox road/name/USA to each state's road data module.translation
: moved from Template:Infobox road/translation/...
to each country's road data module. (I have yet to test this.)law
: moved from
Template:Infobox road/law/USA to each state's road data module, if defined.maint
: moved from
Template:Infobox road/maint/USA to each state's road data module.browse
: moved from
Template:Infobox road/browselinks/USA to each state's road data module. Since browse links may be associated with route types or states, these links have to be moved to two places:
USA.I.browse
.NH[" common "].browse
.nocommonbrowse = true
in the definition of the route type.aux
: moved from part of
Template:Infobox road/meta/spur of to each stata's road data module. This is the full wiki markup describing auxiliary types, e.g., [[Business route]]
. Lua loops can be used to fill these out automatically without explicitly writing them down.
|spec_auxtype=
can be specified, where spec_auxtype
is auxiliary code such as Alt
and Bus
. The definition of these types is at USA[" aux "].aux
. This can be further overridden by providing full wiki markup in |spec_aux=
. Defaults to Auxiliary route
if none of these is unspecified.For other countries, the data are to be moved to road data modules in a similar way.
Some data remain in the Infobox road namespace, because they govern how data are displayed and not themselves data:
Template:Infobox road/hide/...
.These modules are structured so that they can be fetched with mw.loadData
.
Issues
|subtype=
should be deprecated, since |type=
can now include auxiliiary types directly, as in US-Alt
. Moreover, certain route types have multiple subtypes, e.g., US-Truck-Alt
. This change will make route types consistent with {{
jct}}
. Transclusions using this parameter must be modified as part of the transition. To help with this, the sandbox concatenates subtype
to type
before invoking the road data module.{{
lang}}
, which I don't know how to replace with modules yet.Additional features
These are incorporated from past discussions and are independent of the transition.
Dependencies
Extended content
|
---|
Here is a dependency of sandbox modules that will need deployment along with this sandbox: |
Future work (we should discuss)
browse
parameter. For example, multiple rows of previous and next routes can be specified with numbered suffixes, in the same way as multiple route sections.Template:Infobox road/testcases and its subpages may be of your interest. Some shields therein might be incorrect because road data modules need an update. While the current sandbox is robust enough for the transition, template warnings should be inserted first so transclusions needing corrections can be readily identified. Chinissai ( talk) 11:14, 6 May 2016 (UTC)
Mapframe maps are now available on English Wikipedia, and can be inserted with template {{
maplink}}
(or with <mapframe>...</mapframe>
and raw JSON code). This is what the New Jersey Turnpike example from the documentation would look like with a mapframe map:
Route information | |
---|---|
Maintained by the New Jersey Turnpike Authority | |
Location | |
Country | United States |
State | New Jersey |
Highway system | |
{{Infobox road |state=NJ |type=Turnpike |maint=the [[New Jersey Turnpike Authority]] |map={{maplink|frame=yes|plain=yes|frame-align=center|frame-width=290|frame-lat=40.219850|frame-long=-74.699190|zoom=7|type=line|id=Q811504|title=New Jersey Turnpike}} |map_custom=yes |map_notes=Map of the New Jersey Turnpike mainline and spurs in red <!-- other parameters omitted --> }}
If OSM data is unsuitable or unwanted, mapframe maps can draw from GeoJSON data (which can be derived from KML files), either on Commons (must be CC-0) or locally (just needs to be CC-BY-SA compatible):
{{Maplink|frame=yes|plain=yes|from=Sandbox/Evad37/St Georges Terrace.map|type=data|frame-lat=-31.95|frame-long=115.86|zoom=13}}
{{maplink|frame=yes|plain=yes|raw={{Wikipedia:Map data/Main Roads Western Australia/Forrest Highway}}|title=Forrest Highway|frame-lat=-32.9|frame-long=115.7|zoom=8}}
What would be really interesting would be if the infobox template could automatically insert a mapframe map if there is no map image for the road. Which seems like it should be possible in Lua, but might be quite a bit of work. - Evad37 [ talk 06:36, 10 May 2018 (UTC)
frame:preprocess
. I'd suggest that such direct calling functionality be added before we worry about writing our end of the Lua code. -
happy
5214 22:24, 10 May 2018 (UTC)
Conversion done at Wikipedia:Map data/Wikipedia KML/Iowa Highway 192, using a script I made: User:Evad37/kmlToJson.js
I also fixed Iowa 346 on OSM [2] – the relation existed on OSM, but was missing a fair chunk of the route, and wasn't yet linked to Wikidata. The data should be available to mapframe maps in about a day. It seems like there is likely to be a fair amount of cleanup to do on the OSM side of things. - Evad37 [ talk 05:36, 15 May 2018 (UTC)
T193458 -- naveenpf ( talk) 05:53, 15 May 2018 (UTC)
@ Evad37: one problem I'm seeing is for national routes like Interstate 10. It has an OSM relation, but if you go to OSM, no line shows up at all so no line shows up on our map. The state OSM relations work just fine, see Interstate 10 in Texas. – Fredddie ™ 22:34, 13 June 2018 (UTC)
{{
maplink|type=line|id= |type2=line|id2= |...etc...}}
filling in the wikidata ids for all the state articles. -
Evad37 [
talk 01:08, 14 June 2018 (UTC)
We can now store CC-BY-SA data can on Commons. We should probably migrate the Map data subpages over to Commons so that other wikis can more easily reuse the data. - Evad37 [ talk 06:24, 28 August 2018 (UTC)
OK, a working version is now at c:Data:Highway 192 in Iowa (3).map. The procedure I used to create this map file was:
The resulting page c:Data:Highway 192 in Iowa (3).map works a little strange (you can't diff between the older non-map revisions, but you can view them as non-maps, etc.). — RP88 ( talk) 03:14, 29 August 2018 (UTC)
{{Maplink|frame=yes|plain=yes|type=data|from=Highway 192 in Iowa (3).map|frame-lat=41.2609|frame-long=-95.86|zoom=11}}
Should we change templates like Template:USRD to refer to needing JSON (and sending it to Commons) instead of KML? Should we go through and change project pages to suggest using JSON instead of KML? It seems that if we keep encouraging KML, or uploading JSON to enwiki, we'll just be stuck with more pages on enwiki that we can't delete due to our inability to import to Commons (or with KML, being stuck with it forever). -- Rs chen 7754 18:31, 31 August 2018 (UTC)
There is some related discussion at Wikipedia:Village_pump_(proposals)#OpenStreetMap. It's not clear what most people over there are talking about, but it seems some of them are against any kind of map on road articles. Nemo 16:45, 5 August 2019 (UTC)
Some of you have probably seen me tooling around in the Road data modules the last couple weeks and have been wondering what I'm doing. In short, I am taking it upon myself to Luafy the infobox. There are a few modules that I'm working on; here's where I'm at and how you can help:
shieldmain
: For instance, this will call specific shields where we use generic shields in Jct. Think
Media:I-80 (IA 1957).svg instead of
Media:I-80.svg.name
: This is the name of the highway without the state modifier, e.g. State Route 1 instead of California State Route 1.shield
if shieldmain
doesn't exist. I took it out, but I'm really thinking of putting it back.{{
Jct}}
accepts only 2 shields per route and I borrowed the code from Jct for this module. I'd like to increase that up to 4 infobox shields for Puerto Rico. In addition, shieldmain
does not work with the current multiple shield code, so that needs to be addressed as well.{{
Infobox road small}}
as well when the kinks are worked out.{{
Infobox road small}}
, {{
Routelist row}}
, and {{
Jct}}
. I added an orientation
parameter to the road data string modules for files that are taller than they are wide. What this will do remove the x on the shield size. The default infobox shield size is "x70px"; with orientation = "upright"
, it would be "70px" instead. orientation
at all.orientation = "upright"
to the appropriate type in its road data string module.|header_type=
colors so they will override any module.color
parameter in the road data string modules. It would eliminate the need for the color module entirely.So yeah, that's what I've been doing. I really don't know what I'm doing, and I'm amazed I've gone as far as I have. I wanted to thank Happy5214 and Izno for answering my Lua questions when they arise. This has been a fun challenge and I think it'll be great for the encyclopedia when it's done. If you have any questions, comments, concerns, or requests, fire away. – Fredddie ™ 23:44, 19 February 2021 (UTC)
Hi, I'd like to change the icons in the infobox under "Highway system" for Indonesian highways (see for instance Indonesian National Route 11), but I'm having a hard time finding where these are defined. I've already changed the icons from .png to .svg in another part of the template, to give you an idea of what I'm trying to do. Can anyone help me out? ReneeWrites ( talk) 16:44, 31 October 2023 (UTC)
This
edit request to
Template:Infobox road/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
On line 198: from .header-ESP-A, .header-ESP-AP {
to .header-ESP-A, .header-ESP-AP, .header-ESP-Autovia, .header-ESP-Autopista {
. In articles about motorways with prefixes different from AP- or A- we can't use type=A
or type=AP
, as this would generate an incorrect link to the shield image (for example,
Autopista GC-1).
Santi2222 (
talk) 15:29, 27 March 2024 (UTC)
Template:Infobox road is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Highways Template‑class | |||||||
|
If you set up a country to use this template, be sure to add it to this page. |
This template was nominated for
deletion. Please review the prior discussions if you are considering re-nomination:
|
|
||||||||
This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 6 sections are present. |
Are there any plans to convert parts of this infobox to Lua, specifically the shield, route name, and translation? Now that we have fairly robust road data modules, I think these three items should be handled by the road data modules. Yes, I know that these will eventually be handled by Wikidata, but who knows when that will happen? We can use Lua now.
For those locations that don't yet have a road data module, we could utilize a tracking category to catch them, but I don't think there are very many. – Fredddie ™ 16:01, 16 May 2015 (UTC)
Something that might be possible is to have Module:Infobox_road/length get the length from Wikidata, if available and not specified locally. I added length to [1] and we at least can use the same source for all US Interstate articles. Aude ( talk) 09:09, 9 October 2015 (UTC)
{{
Convert}}
was because we wanted it to appear <length><reference> (<conversion>). So long as that's preserved, there will be no opposition from the "it's always been that way" lobby. –
Fredddie
™ 13:02, 10 October 2015 (UTC)
For the past week, I have been converting this template into a Lua module. The sandbox now does not transclude templates, except for certain fallbacks where (1) arguments to the live template need to be changed (discussed in issues below), and (2) data are yet to be defined in road data modules. There was a lot of data movement, and I think I am at a point to request for comments on where I decided to put things.
The goal is to use road data modules as much as possible. For USA, the following data are to be moved to road data modules (see Module:Road data/strings/USA and Module:Road data/strings/USA/NH for examples of an updated modules):
shieldmain
: moved from
Template:Infobox road/shieldmain/USA to each state's road data module. Defaults to shield
if undefined.
shieldmainsize
: size for shieldmain
if it were to be displayed in {{
jct}}
. Defaults to shieldsize
if undefined.name
: moved from
Template:Infobox road/name/USA to each state's road data module.translation
: moved from Template:Infobox road/translation/...
to each country's road data module. (I have yet to test this.)law
: moved from
Template:Infobox road/law/USA to each state's road data module, if defined.maint
: moved from
Template:Infobox road/maint/USA to each state's road data module.browse
: moved from
Template:Infobox road/browselinks/USA to each state's road data module. Since browse links may be associated with route types or states, these links have to be moved to two places:
USA.I.browse
.NH[" common "].browse
.nocommonbrowse = true
in the definition of the route type.aux
: moved from part of
Template:Infobox road/meta/spur of to each stata's road data module. This is the full wiki markup describing auxiliary types, e.g., [[Business route]]
. Lua loops can be used to fill these out automatically without explicitly writing them down.
|spec_auxtype=
can be specified, where spec_auxtype
is auxiliary code such as Alt
and Bus
. The definition of these types is at USA[" aux "].aux
. This can be further overridden by providing full wiki markup in |spec_aux=
. Defaults to Auxiliary route
if none of these is unspecified.For other countries, the data are to be moved to road data modules in a similar way.
Some data remain in the Infobox road namespace, because they govern how data are displayed and not themselves data:
Template:Infobox road/hide/...
.These modules are structured so that they can be fetched with mw.loadData
.
Issues
|subtype=
should be deprecated, since |type=
can now include auxiliiary types directly, as in US-Alt
. Moreover, certain route types have multiple subtypes, e.g., US-Truck-Alt
. This change will make route types consistent with {{
jct}}
. Transclusions using this parameter must be modified as part of the transition. To help with this, the sandbox concatenates subtype
to type
before invoking the road data module.{{
lang}}
, which I don't know how to replace with modules yet.Additional features
These are incorporated from past discussions and are independent of the transition.
Dependencies
Extended content
|
---|
Here is a dependency of sandbox modules that will need deployment along with this sandbox: |
Future work (we should discuss)
browse
parameter. For example, multiple rows of previous and next routes can be specified with numbered suffixes, in the same way as multiple route sections.Template:Infobox road/testcases and its subpages may be of your interest. Some shields therein might be incorrect because road data modules need an update. While the current sandbox is robust enough for the transition, template warnings should be inserted first so transclusions needing corrections can be readily identified. Chinissai ( talk) 11:14, 6 May 2016 (UTC)
Mapframe maps are now available on English Wikipedia, and can be inserted with template {{
maplink}}
(or with <mapframe>...</mapframe>
and raw JSON code). This is what the New Jersey Turnpike example from the documentation would look like with a mapframe map:
Route information | |
---|---|
Maintained by the New Jersey Turnpike Authority | |
Location | |
Country | United States |
State | New Jersey |
Highway system | |
{{Infobox road |state=NJ |type=Turnpike |maint=the [[New Jersey Turnpike Authority]] |map={{maplink|frame=yes|plain=yes|frame-align=center|frame-width=290|frame-lat=40.219850|frame-long=-74.699190|zoom=7|type=line|id=Q811504|title=New Jersey Turnpike}} |map_custom=yes |map_notes=Map of the New Jersey Turnpike mainline and spurs in red <!-- other parameters omitted --> }}
If OSM data is unsuitable or unwanted, mapframe maps can draw from GeoJSON data (which can be derived from KML files), either on Commons (must be CC-0) or locally (just needs to be CC-BY-SA compatible):
{{Maplink|frame=yes|plain=yes|from=Sandbox/Evad37/St Georges Terrace.map|type=data|frame-lat=-31.95|frame-long=115.86|zoom=13}}
{{maplink|frame=yes|plain=yes|raw={{Wikipedia:Map data/Main Roads Western Australia/Forrest Highway}}|title=Forrest Highway|frame-lat=-32.9|frame-long=115.7|zoom=8}}
What would be really interesting would be if the infobox template could automatically insert a mapframe map if there is no map image for the road. Which seems like it should be possible in Lua, but might be quite a bit of work. - Evad37 [ talk 06:36, 10 May 2018 (UTC)
frame:preprocess
. I'd suggest that such direct calling functionality be added before we worry about writing our end of the Lua code. -
happy
5214 22:24, 10 May 2018 (UTC)
Conversion done at Wikipedia:Map data/Wikipedia KML/Iowa Highway 192, using a script I made: User:Evad37/kmlToJson.js
I also fixed Iowa 346 on OSM [2] – the relation existed on OSM, but was missing a fair chunk of the route, and wasn't yet linked to Wikidata. The data should be available to mapframe maps in about a day. It seems like there is likely to be a fair amount of cleanup to do on the OSM side of things. - Evad37 [ talk 05:36, 15 May 2018 (UTC)
T193458 -- naveenpf ( talk) 05:53, 15 May 2018 (UTC)
@ Evad37: one problem I'm seeing is for national routes like Interstate 10. It has an OSM relation, but if you go to OSM, no line shows up at all so no line shows up on our map. The state OSM relations work just fine, see Interstate 10 in Texas. – Fredddie ™ 22:34, 13 June 2018 (UTC)
{{
maplink|type=line|id= |type2=line|id2= |...etc...}}
filling in the wikidata ids for all the state articles. -
Evad37 [
talk 01:08, 14 June 2018 (UTC)
We can now store CC-BY-SA data can on Commons. We should probably migrate the Map data subpages over to Commons so that other wikis can more easily reuse the data. - Evad37 [ talk 06:24, 28 August 2018 (UTC)
OK, a working version is now at c:Data:Highway 192 in Iowa (3).map. The procedure I used to create this map file was:
The resulting page c:Data:Highway 192 in Iowa (3).map works a little strange (you can't diff between the older non-map revisions, but you can view them as non-maps, etc.). — RP88 ( talk) 03:14, 29 August 2018 (UTC)
{{Maplink|frame=yes|plain=yes|type=data|from=Highway 192 in Iowa (3).map|frame-lat=41.2609|frame-long=-95.86|zoom=11}}
Should we change templates like Template:USRD to refer to needing JSON (and sending it to Commons) instead of KML? Should we go through and change project pages to suggest using JSON instead of KML? It seems that if we keep encouraging KML, or uploading JSON to enwiki, we'll just be stuck with more pages on enwiki that we can't delete due to our inability to import to Commons (or with KML, being stuck with it forever). -- Rs chen 7754 18:31, 31 August 2018 (UTC)
There is some related discussion at Wikipedia:Village_pump_(proposals)#OpenStreetMap. It's not clear what most people over there are talking about, but it seems some of them are against any kind of map on road articles. Nemo 16:45, 5 August 2019 (UTC)
Some of you have probably seen me tooling around in the Road data modules the last couple weeks and have been wondering what I'm doing. In short, I am taking it upon myself to Luafy the infobox. There are a few modules that I'm working on; here's where I'm at and how you can help:
shieldmain
: For instance, this will call specific shields where we use generic shields in Jct. Think
Media:I-80 (IA 1957).svg instead of
Media:I-80.svg.name
: This is the name of the highway without the state modifier, e.g. State Route 1 instead of California State Route 1.shield
if shieldmain
doesn't exist. I took it out, but I'm really thinking of putting it back.{{
Jct}}
accepts only 2 shields per route and I borrowed the code from Jct for this module. I'd like to increase that up to 4 infobox shields for Puerto Rico. In addition, shieldmain
does not work with the current multiple shield code, so that needs to be addressed as well.{{
Infobox road small}}
as well when the kinks are worked out.{{
Infobox road small}}
, {{
Routelist row}}
, and {{
Jct}}
. I added an orientation
parameter to the road data string modules for files that are taller than they are wide. What this will do remove the x on the shield size. The default infobox shield size is "x70px"; with orientation = "upright"
, it would be "70px" instead. orientation
at all.orientation = "upright"
to the appropriate type in its road data string module.|header_type=
colors so they will override any module.color
parameter in the road data string modules. It would eliminate the need for the color module entirely.So yeah, that's what I've been doing. I really don't know what I'm doing, and I'm amazed I've gone as far as I have. I wanted to thank Happy5214 and Izno for answering my Lua questions when they arise. This has been a fun challenge and I think it'll be great for the encyclopedia when it's done. If you have any questions, comments, concerns, or requests, fire away. – Fredddie ™ 23:44, 19 February 2021 (UTC)
Hi, I'd like to change the icons in the infobox under "Highway system" for Indonesian highways (see for instance Indonesian National Route 11), but I'm having a hard time finding where these are defined. I've already changed the icons from .png to .svg in another part of the template, to give you an idea of what I'm trying to do. Can anyone help me out? ReneeWrites ( talk) 16:44, 31 October 2023 (UTC)
This
edit request to
Template:Infobox road/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
On line 198: from .header-ESP-A, .header-ESP-AP {
to .header-ESP-A, .header-ESP-AP, .header-ESP-Autovia, .header-ESP-Autopista {
. In articles about motorways with prefixes different from AP- or A- we can't use type=A
or type=AP
, as this would generate an incorrect link to the shield image (for example,
Autopista GC-1).
Santi2222 (
talk) 15:29, 27 March 2024 (UTC)