User:One of Many Tims/sandbox

From Wikipedia, the free encyclopedia

Proposed changes to Template:Rapid transit OSM map

The template generally works if the lines that make up the system have their own Wikidata entries (e.g. S6 (Q7388350) for Zürich S-Bahn), and the entries are connected to an OpenStreetMap line child feature.

Each Wikidata line entity's state of use (P5817) should be in use (Q55654238) and should include the transport network (P16) property (for instance on the S6 (Q7388350) entity, transport network (P16) -> Zürich S-Bahn (Q636091)).

This is a wrapper for Template:Maplink. It fetches `geoline` features and shows them within the template. The template works through a SPARQL Wikidata query. The vital field is `system_qid`, which determines the central item from which all other data is pulled.

First, try this on the Wikipedia page of an item that is supposed to show up on the map (e.g. a metro line):

{{mapframe|frame = yes | type = line | stroke-width = 2}}

If it's not displayed, the item might not yet be linked to an OSM feature.

Usage

{{Rapid transit OSM map/Sandbox
| system_qid      = <!-- Optional. By default It'll assume the wikidata id linked to the page it is being used on. -->
| system_qid[2-5] = <!-- use upto 4 additional systems -->
| frame-lat       = 
| frame-long      = 
| frame-width     = 
| frame-height    = 
| frame-align     = 
| stroke-width    = <!-- Default is 3, use 2 for dense networks -->
| plain           = 
| text            = 
| zoom            = 
| display         = 
| single_line     = <!-- Useful to show a specific transit line. See examples below -->
| stations        = <!-- Any value will show the stations of a line/system. -->
| stations_qid    = <!-- Optional. By default It'll assume the wikidata id linked to the page it is being used on. -->
|rail-colour=<!-- Optional. Use this hex colo(u)r instead of the official Wikidata colour without the #. Eg 000000 for black -->
| marker-symbol   = <!-- If stations is set; Default is rail-metro -->
| marker-colo(u)r = <!-- If stations is set. -->
| marker-size     = <!-- If stations is set; Default is medium. -->
}}

Typical marker-symbols

  • marker-symbol=rail
  • marker-symbol=rail-metro
  • marker-symbol=rail-light

Examples

Rapid transit system

Frankfurt

{{Rapid transit OSM map/Sandbox
| system_qid   = Q705684
| frame-width  = 500
| frame-height = 440
| zoom         = 10
| text         = Frankfurt
| plain        = no
}}
Frankfurt

Moscow

{{Rapid transit OSM map/Sandbox
| system_qid   = Q5499
| frame-lat    = 55.75
| frame-long   = 37.6
| frame-width  = 500
| frame-height = 440
| text         = Moscow
| plain        = no
}}
Moscow

A specific line of a system

{{Rapid transit OSM map/Sandbox
| system_qid   = Q7388350 <!-- not needed as the template can determine this from the page it is being used on. -->
| frame-lat    = 47.34
| frame-long   = 8.57
| frame-width  = 400
| frame-height = 440
| zoom         = 11
| stations     = y
| stations_qid = Q7388350 <!-- not needed as the template can determine this from the page it is being used on. -->
| single_line  = y
| text         = Zurich S6
| plain        = no
}}
|}
Zurich S6

New test case: specific line of a system, stations are still in use but no longer servicing that line

{{Rapid transit OSM map/Sandbox
| system_qid   = Q392496
| stations_qid = Q3239152
| stations     = y
| zoom         = 11
| frame-width  = 400
| frame-height = 600
| frame-lat    = 45.618406
| frame-long   = -73.596458
}}
|}

New test case: REM

New test case: specific line of a system, stations has other lines no longer in use

(This line sharse a station with the line above, but the former no longer services it)

{{Rapid transit OSM map/Sandbox
| system_qid   = Q392496
| stations_qid = Q3239159
| stations     = y
| zoom         = 10
| frame-width  = 500
| frame-height = 400
| frame-lat    = 45.512117
| frame-long   = -73.373222
}}
|}

Rapid transit network of a region

{{Rapid transit OSM map/Sandbox
| system_qid   = Q1814382
| frame-lat    = 37.99
| frame-long   = 23.73
| frame-width  = 500
| frame-height = 440
| zoom         = 10
| text         = Athens
| plain        = no
}}
Athens

See also

Proposed changes to Template:Rail-interchange and Template:Rail-interchange/doc/CA

Laval
Proposed: Everything below
  • Société de transport de Laval {{rint/sandbox|laval|stl}}
    • {{rint/sandbox|laval|bus}}
      •   3  {{rint/sandbox|laval|3}}
    •  3  {{rint/sandbox|laval|bus|3}}
Longueuil
Proposed: Everything below
  • Réseau de transport de Longueuil {{rint/sandbox|longueuil|rtl}}
    • {{rint/sandbox|longueuil|bus}}
      •   5  {{rint/sandbox|longueuil|bus|5}}
        •   9   {{rint/sandbox|longueuil|bus|9|accessible}}
    •  3  {{rint/sandbox|longueuil|3}}
      •  8   {{rint/sandbox|longueuil|8|accessible}}
Montréal
  • Exo (public transit) {{rint|montreal|exo}} or {{…|montreal|rail}}
    optional 3rd argument (route name) displays a colour box and a link to that route:
    • {{rint|montreal|exo|11}} or {{…|exo|Vaudreuil-Hudson}}
    • {{rint|montreal|exo|12}} or {{…|exo|Saint-Jérôme}}
    • {{rint|montreal|exo|13}} or {{…|exo|Mont-Saint-Hilaire}}
    • {{rint|montreal|exo|14}} or {{…|exo|Candiac}}
    • {{rint|montreal|exo|15}} or {{…|exo|Mascouche}}
    optional 3rd argument for specific modes:
    • {{rint|montreal|exo|train}} or {{…|exo|rail}}
    • {{rint|montreal|exo|bus}}
  • {{rint|montreal|metro}}
    optional 3rd argument changes to a colour box with the line number (1, 2, 4 or 5) and a link to that line:
    • {{rint|montreal|metro|1}} or {{…|metro|green}}
    • {{rint|montreal|metro|2}} or {{…|metro|orange}}
    • {{rint|montreal|metro|4}} or {{…|metro|yellow}}
    • {{rint|montreal|metro|5}} or {{…|metro|blue}}
  • {{rint|montreal|rem}}
    optional 3rd argument for line or terminus icons:
    • {{rint|montreal|rem|A}}
    • {{rint|montreal|rem|A1}}
    • {{rint|montreal|rem|A2}}
    • {{rint|montreal|rem|A3}}
    • {{rint|montreal|rem|A4}}
  • List of STM bus routes {{rint|montreal|bus}}
    • Proposed to add
      :optional 3rd argument adds a box with the route number and a link to that route:
      List of STM bus routes  101  {{rint/sandbox|montreal|bus|101}} etc.
    • optional 3rd and 4th argument for specific services:
      • Proposed remove, will show as 'bus' for backward compatibility
        List of STM bus routes {{rint|montreal|bus|navetteor}}
      • List of STM bus routes {{rint|montreal|bus|night}}
      • Proposed to add:
        List of STM bus routes  301 ☾   {{rint/sandbox|montreal|bus|night|301}}
      • Proposed to add:
        List of STM bus routes{{rint/sandbox|montreal|bus|all-day high-frequency}}
      • Proposed to add:
        List of STM bus routes  121  {{rint/sandbox|montreal|bus|all-day high-frequency|121}}
      • Proposed to add:
        List of STM bus routes {{rint/sandbox|montreal|bus|rush-hour high-frequency}}
      • Proposed to add:
        List of STM bus routes  174  {{rint/sandbox|montreal|bus|rush-hour high-frequency|174}}
      • Proposed to add:
        {{rint/sandbox|montreal|taxibus}}
      • Proposed to add:
          174  {{rint/sandbox|montreal|taxibus|174}}
      • Proposed remove, will show as 'bus' for backward compatibility
        List of STM bus routes {{rint|montreal|bus|express}}
      • Proposed remove, will show as 'bus' for backward compatibility
        List of STM bus routes {{rint|montreal|bus|shuttle}}

Using the Module:Adjacent stations/Société de transport de Montréal

More information code, result ...
code result
{{ric|Société de transport de Montréal|taxibus|size=20px}}
{{ric|Société de transport de Montréal|bus|size=20px}} List of STM bus routes
{{rcb|Société de transport de Montréal|bus|inline=route}} STM
{{rbox|121||#{{rcr|Société de transport de Montréal|all-day high-frequency}}|#fff}}  121 
{{rbox|174||#{{rcr|Société de transport de Montréal|rush-hour high-frequency}}|#{{rcr|Société de transport de Montréal/sandbox|all-day high-frequency}}|border=#{{rcr|Société de transport de Montréal|all-day high-frequency}}}}  174 
{{rbox|378 {{emoji presentation|☾|text}}||#{{rcr|Société de transport de Montréal|night}}|#fff}}  378 ☾ 
{{rbox|747 {{emoji presentation|✈|text}}||#{{rcr|Société de transport de Montréal|747}}|#fff}}  747 ✈ 
{{ric|Société de transport de Montréal|night}} List of STM bus routes
{{ric|Société de transport de Montréal|all-day high-frequency}} List of STM bus routes
{{ric|Société de transport de Montréal|rush-hour high-frequency}} List of STM bus routes
Close

Using Template:Rail-interchange/sandbox

Just the night icon: List of STM bus routes What happens if I specify an icon size: List of STM bus routes

More information code, result ...
code result
{{rint/sandbox|montreal|bus}} List of STM bus routes
{{rint/sandbox|montreal|bus|123}} List of STM bus routes  123 
{{rint/sandbox|montreal|bus|747}} List of STM bus routes  747 ✈ 
{{rint/sandbox|montreal|bus|all-day high-frequency}} List of STM bus routes
{{rint/sandbox|montreal|bus|all-day high-frequency|121}} List of STM bus routes  121 
{{rint/sandbox|montreal|bus|rush-hour high-frequency}} List of STM bus routes
{{rint/sandbox|montreal|bus|rush-hour high-frequency|174}} List of STM bus routes  174 
{{rint/sandbox|montreal|bus|night}} List of STM bus routes
{{rint/sandbox|montreal|bus|night|378}} List of STM bus routes  378 ☾  
{{rint/sandbox|longueuil|bus}}
{{rint/sandbox|longueuil|rtl}} Réseau de transport de Longueuil
{{rint/sandbox|longueuil|3}}  3 
{{rint/sandbox|longueuil|8|accessible}}  8  
{{rint/sandbox|longueuil|bus|5}}   5 
{{rint/sandbox|longueuil|bus|9|accessible}}   9  
{{rint/sandbox|laval|stl}} Société de transport de Laval
{{rint/sandbox|laval|3}}  3 
{{rint/sandbox|laval|bus}}
{{rint/sandbox|laval|bus|3}}   3 
Close

Using Module:Adjacent stations/Canada transit for RTL and STL

More information code, result ...
code result
{{ric|Canada transit|RTL|size=20px}}
{{rcb|Canada transit|RTL|inline=route}} RTL
{{rbox|5||#{{rcr|Canada transit|RTL}}|#fff}}  5 
{{rbox|9 {{emoji presentation|♿|text}}||#{{rcr|Canada transit|RTL}}|#fff}}  9 ♿ 
{{rint/sandbox|longueuil|bus|8|accessible}}   8  
{{ric|Canada transit|STL|size=20px}}
{{rcb|Canada transit|STL|inline=route}} STL
{{rbox|T23||#{{rcr|Canada transit|STL}}|#fff}}  T23 
{{rbox|39||#{{rcr|Canada transit|STL}}|#fff}}  39 
Close

Test REM icon in dark mode

Montreal bus route box tests

STM  121   174   121   378 ☾   747 ✈ 

Exo, using RouteBox and Module:Adjacent stations/Exo/sandbox:

Testing with rint: Exo (public transit)

Testing with rint: Testing with rint:

Testing with rint: Testing with rint:

Testing with rint:   111  Testing with rint:   111x (express bus)  Testing with rint:   111r   Testing with rint:   111d (on demand or reservation bus) 

Exo  481 Express   680 Régional   380 (exo à la demande) 

Exo, using Color box and Module:Adjacent stations/Exo/sandbox:

Exo  481 Express   680 Régional   380 (exo à la demande) 

Attempts to create unicode versions of symbols:

  • Express like so »⃝{U+|20DD}}
  • Regional like so: ↔⃝U+20DD
  • On demand like so:

Related Articles

Wikiwand AI