Ticket #23977: add_train_station_entrance_2.patch

File add_train_station_entrance_2.patch, 10.7 KB (added by Claudius, 7 months ago)

Enhanced patch to also add a preset for the train station entrance (this also adds the optional reference field to the subway entrances preset for consistency)

  • resources/data/defaultpresets.xml

     
    34123412            <key key="railway" value="subway_entrance" />
    34133413            <optional>
    34143414                <text key="name" text="Name" />
     3415                <text key="ref" text="Reference" />
    34153416                <reference ref="wheelchair" />
    34163417                <check key="bicycle" text="Bicycle" />
    34173418            </optional>
    34183419        </item> <!-- Subway Entrance -->
     3420        <item name="Train Station Entrance" icon="presets/transport/station_entrance.svg" type="node" preset_name_label="true">
     3421            <link wiki="Tag:railway=train_station_entrance" />
     3422            <key key="railway" value="train_station_entrance" />
     3423            <optional>
     3424                <text key="name" text="Name" />
     3425                <text key="ref" text="Reference" />
     3426                <reference ref="wheelchair" />
     3427                <check key="bicycle" text="Bicycle" />
     3428            </optional>
     3429        </item> <!-- Train Station Entrance -->
    34193430        <item name="Ticket Machine" icon="presets/transport/ticket-machine.svg" type="node" preset_name_label="true">
    34203431            <link wiki="Tag:amenity=vending_machine" />
    34213432            <space />
  • resources/images/presets/transport/station_entrance.svg

     
     1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
     2<!-- Created with Inkscape (http://www.inkscape.org/) -->
     3
     4<svg
     5   xmlns:dc="http://purl.org/dc/elements/1.1/"
     6   xmlns:cc="http://creativecommons.org/ns#"
     7   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     8   xmlns:svg="http://www.w3.org/2000/svg"
     9   xmlns="http://www.w3.org/2000/svg"
     10   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
     11   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
     12   version="1.0"
     13   width="16"
     14   height="16"
     15   id="svg2"
     16   sodipodi:version="0.32"
     17   inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
     18   sodipodi:docname="station_entrance.svg"
     19   inkscape:output_extension="org.inkscape.output.svg.inkscape">
     20  <defs
     21     id="defs22">
     22    <inkscape:perspective
     23       sodipodi:type="inkscape:persp3d"
     24       inkscape:vp_x="0 : 290 : 1"
     25       inkscape:vp_y="0 : 1000 : 0"
     26       inkscape:vp_z="580 : 290 : 1"
     27       inkscape:persp3d-origin="290 : 193.33333 : 1"
     28       id="perspective24" />
     29    <marker
     30       viewBox="0 0 10 10"
     31       refY="5"
     32       refX="10"
     33       orient="auto"
     34       markerWidth="4"
     35       markerUnits="strokeWidth"
     36       markerHeight="3"
     37       id="ArrowStart">
     38      <path
     39         id="path3568"
     40         d="M 10,0 0,5 10,10 Z"
     41         inkscape:connector-curvature="0" />
     42    </marker>
     43    <marker
     44       viewBox="0 0 10 10"
     45       refY="5"
     46       refX="0"
     47       orient="auto"
     48       markerWidth="4"
     49       markerUnits="strokeWidth"
     50       markerHeight="3"
     51       id="ArrowEnd">
     52      <path
     53         id="path3565"
     54         d="M 0,0 10,5 0,10 Z"
     55         inkscape:connector-curvature="0" />
     56    </marker>
     57    <inkscape:perspective
     58       id="perspective2683"
     59       inkscape:persp3d-origin="306.082 : 204.39034 : 1"
     60       inkscape:vp_z="612.164 : 306.58551 : 1"
     61       inkscape:vp_y="0 : 1000 : 0"
     62       inkscape:vp_x="0 : 306.58551 : 1"
     63       sodipodi:type="inkscape:persp3d" />
     64    <marker
     65       viewBox="0 0 10 10"
     66       refY="5"
     67       refX="10"
     68       orient="auto"
     69       markerWidth="4"
     70       markerUnits="strokeWidth"
     71       markerHeight="3"
     72       id="marker2959">
     73      <path
     74         id="path2626"
     75         d="M 10,0 0,5 10,10 Z"
     76         inkscape:connector-curvature="0" />
     77    </marker>
     78    <marker
     79       viewBox="0 0 10 10"
     80       refY="5"
     81       refX="0"
     82       orient="auto"
     83       markerWidth="4"
     84       markerUnits="strokeWidth"
     85       markerHeight="3"
     86       id="marker2956">
     87      <path
     88         id="path2623"
     89         d="M 0,0 10,5 0,10 Z"
     90         inkscape:connector-curvature="0" />
     91    </marker>
     92    <inkscape:perspective
     93       id="perspective2953"
     94       inkscape:persp3d-origin="306.082 : 204.39034 : 1"
     95       inkscape:vp_z="612.164 : 306.58551 : 1"
     96       inkscape:vp_y="0 : 1000 : 0"
     97       inkscape:vp_x="0 : 306.58551 : 1"
     98       sodipodi:type="inkscape:persp3d" />
     99    <marker
     100       viewBox="0 0 10 10"
     101       refY="5"
     102       refX="10"
     103       orient="auto"
     104       markerWidth="4"
     105       markerUnits="strokeWidth"
     106       markerHeight="3"
     107       id="marker3077">
     108      <path
     109         id="path3298"
     110         d="M 10,0 0,5 10,10 Z"
     111         inkscape:connector-curvature="0" />
     112    </marker>
     113    <marker
     114       viewBox="0 0 10 10"
     115       refY="5"
     116       refX="0"
     117       orient="auto"
     118       markerWidth="4"
     119       markerUnits="strokeWidth"
     120       markerHeight="3"
     121       id="marker3074">
     122      <path
     123         id="path3295"
     124         d="M 0,0 10,5 0,10 Z"
     125         inkscape:connector-curvature="0" />
     126    </marker>
     127    <inkscape:perspective
     128       id="perspective3071"
     129       inkscape:persp3d-origin="180.936 : 163.92867 : 1"
     130       inkscape:vp_z="361.87201 : 245.89301 : 1"
     131       inkscape:vp_y="0 : 1000 : 0"
     132       inkscape:vp_x="0 : 245.89301 : 1"
     133       sodipodi:type="inkscape:persp3d" />
     134    <inkscape:perspective
     135       id="perspective3724"
     136       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
     137       inkscape:vp_z="1 : 0.5 : 1"
     138       inkscape:vp_y="0 : 1000 : 0"
     139       inkscape:vp_x="0 : 0.5 : 1"
     140       sodipodi:type="inkscape:persp3d" />
     141    <inkscape:perspective
     142       id="perspective7956"
     143       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
     144       inkscape:vp_z="1 : 0.5 : 1"
     145       inkscape:vp_y="0 : 1000 : 0"
     146       inkscape:vp_x="0 : 0.5 : 1"
     147       sodipodi:type="inkscape:persp3d" />
     148    <inkscape:perspective
     149       id="perspective8355"
     150       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
     151       inkscape:vp_z="1 : 0.5 : 1"
     152       inkscape:vp_y="0 : 1000 : 0"
     153       inkscape:vp_x="0 : 0.5 : 1"
     154       sodipodi:type="inkscape:persp3d" />
     155  </defs>
     156  <metadata
     157     id="metadata10">
     158    <rdf:RDF>
     159      <cc:Work
     160         rdf:about="">
     161        <dc:format>image/svg+xml</dc:format>
     162        <dc:type
     163           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
     164        <cc:license
     165           rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
     166        <dc:language>en</dc:language>
     167        <dc:title />
     168      </cc:Work>
     169      <cc:License
     170         rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
     171        <cc:permits
     172           rdf:resource="http://creativecommons.org/ns#Reproduction" />
     173        <cc:permits
     174           rdf:resource="http://creativecommons.org/ns#Distribution" />
     175        <cc:permits
     176           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
     177      </cc:License>
     178    </rdf:RDF>
     179  </metadata>
     180  <sodipodi:namedview
     181     inkscape:window-height="1009"
     182     inkscape:window-width="1920"
     183     inkscape:pageshadow="2"
     184     inkscape:pageopacity="0.0"
     185     guidetolerance="10.0"
     186     gridtolerance="10.0"
     187     objecttolerance="10.0"
     188     borderopacity="1.0"
     189     bordercolor="#666666"
     190     pagecolor="#ffffff"
     191     id="base"
     192     showgrid="true"
     193     inkscape:zoom="16.000001"
     194     inkscape:cx="13.191269"
     195     inkscape:cy="7.5760419"
     196     inkscape:window-x="-8"
     197     inkscape:window-y="-8"
     198     inkscape:current-layer="svg2"
     199     inkscape:window-maximized="1"
     200     fit-margin-top="0"
     201     fit-margin-left="0"
     202     fit-margin-right="0"
     203     fit-margin-bottom="0">
     204    <inkscape:grid
     205       type="xygrid"
     206       id="grid4249" />
     207  </sodipodi:namedview>
     208  <path
     209     inkscape:connector-curvature="0"
     210     id="path1329"
     211     style="fill:#ffffff;stroke:none;stroke-width:3.40799999;fill-opacity:1;stroke-opacity:1"
     212     d="M 1.792253,0.00176061 C 0.64495383,0.00176061 0,0.59391061 0,1.8037806 L 0,14.275761 c 0,1.13171 0.57994055,1.72424 1.726228,1.72424 l 12.546522,0 c 1.146528,0 1.72725,-0.56291 1.72725,-1.72424 L 16,1.8037806 c 0,-1.18038999 -0.580722,-1.80201999 -1.763142,-1.80201999 -8e-5,0 -12.4485419,-0.004 -12.444605,0 z" />
     213  <g
     214     id="g2319"
     215     transform="translate(879.29125,-527.19488)">
     216    <path
     217       id="path2323"
     218       style="fill:#ffffff;stroke:none"
     219       d=""
     220       inkscape:connector-curvature="0" />
     221  </g>
     222  <g
     223     id="g2325"
     224     transform="translate(879.29125,-527.19488)">
     225    <path
     226       id="path2329"
     227       style="fill:#ffffff;stroke:none"
     228       d=""
     229       inkscape:connector-curvature="0" />
     230  </g>
     231  <g
     232     id="g4264"
     233     transform="translate(5.9999998,1.9999615)"
     234     style="stroke:#000000;stroke-opacity:1">
     235    <path
     236       sodipodi:nodetypes="cccc"
     237       id="path8372"
     238       d="m 2.478544,11.578874 v -8.0822 h 5.0753842 v 8.0822"
     239       style="fill:none;stroke:#000000;stroke-width:1.03557968;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     240       inkscape:connector-curvature="0" />
     241    <rect
     242       y="4.0554256"
     243       x="2.8336146"
     244       height="7.4207835"
     245       width="4.292532"
     246       id="rect8376"
     247       style="opacity:0.2;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.10825205;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
     248  </g>
     249  <path
     250     inkscape:connector-curvature="0"
     251     style="fill:none;stroke:#000000;stroke-width:1.23199999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     252     d="M 1.3929143,3.6254839 5.4931664,6.6274836 5.4809446,3.6150613"
     253     id="path8395"
     254     sodipodi:nodetypes="ccc" />
     255  <path
     256     inkscape:connector-curvature="0"
     257     id="path8397"
     258     d="M 1.3845781,3.5614666 5.4145178,6.6728413 2.4285614,7.6026197"
     259     style="fill:none;stroke:#000000;stroke-width:1.23199999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     260     sodipodi:nodetypes="ccc" />
     261</svg>
  • resources/styles/standard/elemstyles.mapcss

     
    43084308    icon-image: "presets/transport/underground.svg";
    43094309    set icon_z17;
    43104310}
     4311node[railway=train_station_entrance] {
     4312    icon-image: "presets/transport/station_entrance.svg";
     4313    set icon_z17;
     4314}
    43114315node[railway=crossing] {
    43124316    icon-image: "presets/transport/railway/crossing.svg";
    43134317    set icon_z17;