Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Track gauge/data/doc
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{High-use}} [[Module:Track gauge/data]] holds the data for [[Module:Track gauge]] and template {{tlt|Track gauge}}. It contains some 250 track gauge definitions (widths), often by different units (defined metric and/or imperial). ==Entry data structure== A single entry is a subtable (by <code>{...}</code>) in the data page. The full entry is approached by an alias (normalised input). The subtable has the following structure: <pre> { ["full-id"] = "1435-met", -- Gauge-id including unit ["id"] = "1000", -- Gauge identification in mm. ["aliases"] = {[[1000mm]], [[1m]]}, -- Aliases for the gauge (input options; input spaces, commas and capitals are re-formatted by the module). ["def1"] = "met", -- The defining measurement, either "met" (metric) or "imp" (imperial). ["name"] = "metre gauge", -- Name for the gauge (alternative). ["link"] = "[[Metre gauge railway]]", -- Link to named gauge article (alternative, linked). ["pagename"] = "standard gauge", -- Link to sourcing Wikipedia article. ["contentcat"] = "Iberian gauge railways" -- Non-default category name (don't add 'Category:'). ["m"] = "1", -- Gauge in metre (the ["mm"] value, below, will not be shown). ["mm"] = "1000", -- Gauge in mm. ["ft"] = "3", -- The feet part of the gauge. ["in"] = "3", -- The inches part of the gauge (can have decimals) ["num"] = "3", -- The numerator for fractions of inches (the "3" in 3/8 inches). ["den"] = "8" -- The denominator for fractions of inches (the "8" in 3/8 inches). }, </pre> ==About aliases and identifiers== A rail track gauge is identified by "id". That id is the size in mm (a choice, made for this list). Preferably it has an article link where that gauge definition is described and sourced. An entry is a data set (a complete subtable) with structure <code>{ ["id"] = "n", ... }</code> An entry is identified by its Aliases. Aliases are unique; any alias will find only one entry (if present). Two entries can point to one gauge id: usually when definied in metric *and* defined in imperial. e.g., "1435mm" and "56.5in" are different entries (showing different primary size: in met or imp) but they point to the same gauge id: ["id"] = "1435". The "id", "aliases", and "def1" fields are required. Also, some size in metric and in imperial must be present. That is: at least one metric size field (mm or m) and one imperial size field (ft, inch, or num+den) must exist. All other fields are optional. :'''id''': An id stands for the physical size, a length. It can be reused in multiple entries, for example when a gauge is defined in both metric and in imperial. Even a third gauge name (by another alias) can use ths size-id. :'''alias''' (input option): An ''alias'' must be unique over all data. Alias names here should not contain any spaces; spaces are trimmed from the input when it is processed, so alias names containing spaces will not be matched. == Development == * Data "history" = {date begin, date end} -- to denote the era of existance * Data "unique" = "yes" -- to denote single network ::See {{track gauge |14 1/4 in|lk=on}} ==See also== * {{tl|Track gauge/doc/input options}} -- Overview
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template:High-use
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Template:Tlt
(
edit
)
Template:Track gauge
(
edit
)