[generator] [styles] [strings] add Docklands Light Railway, Porto metro

Signed-off-by: Harry Bond <endim8@pm.me>
This commit is contained in:
Harry Bond 2023-09-25 17:18:05 +01:00 committed by Alexander Borsuk
parent a4961b5e99
commit d827233f24
19 changed files with 106 additions and 8 deletions

View file

@ -1658,3 +1658,5 @@ historic|locomotive;1582;
craft|caterer;1583;
craft|grinding_mill;1584;
leisure|outdoor_seating;1585;
railway|station|light_rail|london;[railway=station][station=light_rail][city=london];;name;int_name;1586;
railway|station|light_rail|porto;[railway=station][station=light_rail][city=porto];;name;int_name;1587;

Can't render this file because it contains an unexpected character in line 7 and column 16.

View file

@ -21090,6 +21090,14 @@
zh-Hans = 轻轨车站
zh-Hant = 輕軌車站
[type.railway.station.light_rail.london]
ref = type.railway.station.light_rail
en = DLR Station
[type.railway.station.light_rail.porto]
ref = type.railway.station.light_rail
en = Porto Metro
[type.railway.station.monorail]
ref = type.railway.station
en = Monorail Station
@ -21713,8 +21721,8 @@
[type.railway.subway_entrance.london]
ref = type.railway.subway_entrance
en = Underground Station Entrance
en-GB = Underground Station Entrance
en = Metro Station Entrance
en-GB = Metro Station Entrance
[type.railway.subway_entrance.lyon]
ref = type.railway.subway_entrance

View file

@ -432,8 +432,8 @@ node|z12-13[railway=station][transport=subway][city=london] {icon-image: subway-
node|z14[railway=station][transport=subway][city=london] {icon-image: subway-london-s.svg;}
node|z15-16[railway=station][transport=subway][city=london] {icon-image: subway-london-m.svg;}
node|z17-[railway=station][transport=subway][city=london] {icon-image: subway-london-m.svg;}
node|z16-17[railway=subway_entrance][city=london] {icon-image: subway-london-s.svg;}
node|z18-[railway=subway_entrance][city=london] {icon-image: subway-london-m.svg;}
node|z16-17[railway=subway_entrance][city=london] {icon-image: subway_entrance-london-s.svg;}
node|z18-[railway=subway_entrance][city=london] {icon-image: subway_entrance-london-m.svg;}
/* Los Angeles Subway Station */
node|z12-13[railway=station][transport=subway][city=la] {icon-image: subway-losangeles-s.svg;icon-min-distance: 1;}
@ -920,3 +920,13 @@ node|z15-16[railway=station][transport=subway][city=yokohama] {icon-image: subwa
node|z17-[railway=station][transport=subway][city=yokohama] {icon-image: subway-yokohama-m.svg;}
node|z16-[railway=subway_entrance][city=yokohama] {icon-image: subway-yokohama-s.svg;}
/* LIGHT RAIL */
/* London Light Rail Station (DLR) */
node|z12-14[railway=station][station=light_rail][city=london] {icon-image: light_rail-dlr-london-s.svg;icon-min-distance: 1;}
node|z15-[railway=station][station=light_rail][city=london] {icon-image: light_rail-dlr-london-m.svg;}
/* Porto Light Rail Station */
node|z12-14[railway=station][station=light_rail][city=porto] {icon-image: light_rail-porto-s.svg;icon-min-distance: 1;}
node|z15-[railway=station][station=light_rail][city=porto] {icon-image: light_rail-porto-m.svg;}

View file

@ -113,6 +113,8 @@ natural-water-lake # caption z10- (also has are
natural-water-reservoir # caption z10- (also has area z1-)
railway-station-funicular # icon z12- (also has caption(optional) z12-)
railway-station-light_rail # icon z12- (also has caption(optional) z12-)
railway-station-light_rail-london # icon z12- (also has caption(optional) z12-)
railway-station-light_rail-porto # icon z12- (also has caption(optional) z12-)
railway-station-monorail # icon z12- (also has caption(optional) z12-)
railway-station-subway-adana # icon z12- (also has caption(optional) z14-)
railway-station-subway-algiers # icon z12- (also has caption(optional) z14-)
@ -1316,6 +1318,8 @@ amenity-parking-private # icon z18- (also has captio
# railway-station-funicular # caption(optional) z12- (also has icon z12-)
# railway-station-light_rail # caption(optional) z12- (also has icon z12-)
# railway-station-light_rail-london # caption(optional) z12- (also has icon z12-)
# railway-station-light_rail-porto # caption(optional) z12- (also has icon z12-)
# railway-station-monorail # caption(optional) z12- (also has icon z12-)
# railway-station-subway-adana # caption(optional) z14- (also has icon z12-)
# railway-station-subway-algiers # caption(optional) z14- (also has icon z12-)

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 23 17" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m3.7517 5h-3.7517v7h3.7517c1.334 2.9485 4.3016 5 7.7483 5 3.4467 0 6.4143-2.0515 7.7483-5h3.7517v-7h-3.7517c-1.334-2.9485-4.3016-5-7.7483-5-3.4467 0-6.4143 2.0515-7.7483 5z" fill="#FFF" opacity=".6"/>
<path d="m11.5 16c-4.1421 0-7.5-3.3579-7.5-7.5 0-4.1421 3.3579-7.5 7.5-7.5 4.1421 0 7.5 3.3579 7.5 7.5 0 4.1421-3.3579 7.5-7.5 7.5zm0-3c2.4853 0 4.5-2.0147 4.5-4.5 0-2.4853-2.0147-4.5-4.5-4.5-2.4853 0-4.5 2.0147-4.5 4.5 0 2.4853 2.0147 4.5 4.5 4.5z" fill="#00AFAA"/>
<rect x="1" y="6" width="21" height="5" fill="#000F9F"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 619 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 17 13" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m2.4982 4c0.97956-2.349 3.2979-4 6.0018-4 2.704 0 5.0223 1.651 6.0018 4h2.4982v5h-2.4982c-0.97956 2.349-3.2979 4-6.0018 4-2.7039 0-5.0223-1.651-6.0018-4h-2.4982v-5h2.4982z" fill="#FFF" opacity=".6"/>
<path d="m8.5 12c-3.0376 0-5.5-2.4624-5.5-5.5s2.4624-5.5 5.5-5.5c3.0376 0 5.5 2.4624 5.5 5.5s-2.4624 5.5-5.5 5.5zm0-2c1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5c-1.933 0-3.5 1.567-3.5 3.5s1.567 3.5 3.5 3.5z" fill="#00AFAA"/>
<rect x="1" y="5" width="15" height="3" fill="#000F9F"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 578 B

View file

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 832 B

View file

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 806 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 23 17" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m3.7517 5h-3.7517v7h3.7517c1.334 2.9485 4.3016 5 7.7483 5 3.4467 0 6.4143-2.0515 7.7483-5h3.7517v-7h-3.7517c-1.334-2.9485-4.3016-5-7.7483-5-3.4467 0-6.4143 2.0515-7.7483 5z" fill="#FFF" opacity=".6"/>
<path d="m11.5 16c-4.1421 0-7.5-3.3579-7.5-7.5 0-4.1421 3.3579-7.5 7.5-7.5 4.1421 0 7.5 3.3579 7.5 7.5 0 4.1421-3.3579 7.5-7.5 7.5zm0-3c2.4853 0 4.5-2.0147 4.5-4.5 0-2.4853-2.0147-4.5-4.5-4.5-2.4853 0-4.5 2.0147-4.5 4.5 0 2.4853 2.0147 4.5 4.5 4.5z" fill="#717065"/>
<rect x="1" y="6" width="21" height="5" fill="#717065"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 619 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 17 13" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m2.4982 4c0.97956-2.349 3.2979-4 6.0018-4 2.704 0 5.0223 1.651 6.0018 4h2.4982v5h-2.4982c-0.97956 2.349-3.2979 4-6.0018 4-2.7039 0-5.0223-1.651-6.0018-4h-2.4982v-5h2.4982z" fill="#FFF" opacity=".6"/>
<path d="m8.5 12c-3.0376 0-5.5-2.4624-5.5-5.5s2.4624-5.5 5.5-5.5c3.0376 0 5.5 2.4624 5.5 5.5s-2.4624 5.5-5.5 5.5zm0-2c1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5c-1.933 0-3.5 1.567-3.5 3.5s1.567 3.5 3.5 3.5z" fill="#717065"/>
<rect x="1" y="5" width="15" height="3" fill="#717065"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 578 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 23 17" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m3.7517 5h-3.7517v7h3.7517c1.334 2.9485 4.3016 5 7.7483 5 3.4467 0 6.4143-2.0515 7.7483-5h3.7517v-7h-3.7517c-1.334-2.9485-4.3016-5-7.7483-5-3.4467 0-6.4143 2.0515-7.7483 5z" fill="#FFF" opacity=".6"/>
<path d="m11.5 16c-4.1421 0-7.5-3.3579-7.5-7.5 0-4.1421 3.3579-7.5 7.5-7.5 4.1421 0 7.5 3.3579 7.5 7.5 0 4.1421-3.3579 7.5-7.5 7.5zm0-3c2.4853 0 4.5-2.0147 4.5-4.5 0-2.4853-2.0147-4.5-4.5-4.5-2.4853 0-4.5 2.0147-4.5 4.5 0 2.4853 2.0147 4.5 4.5 4.5z" fill="#009993"/>
<rect x="1" y="6" width="21" height="5" fill="#032759"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 619 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 17 13" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m2.4982 4c0.97956-2.349 3.2979-4 6.0018-4 2.704 0 5.0223 1.651 6.0018 4h2.4982v5h-2.4982c-0.97956 2.349-3.2979 4-6.0018 4-2.7039 0-5.0223-1.651-6.0018-4h-2.4982v-5h2.4982z" fill="#FFF" opacity=".6"/>
<path d="m8.5 12c-3.0376 0-5.5-2.4624-5.5-5.5s2.4624-5.5 5.5-5.5c3.0376 0 5.5 2.4624 5.5 5.5s-2.4624 5.5-5.5 5.5zm0-2c1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5c-1.933 0-3.5 1.567-3.5 3.5s1.567 3.5 3.5 3.5z" fill="#009993"/>
<rect x="1" y="5" width="15" height="3" fill="#032759"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 578 B

View file

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 832 B

View file

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 806 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 23 17" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m3.7517 5h-3.7517v7h3.7517c1.334 2.9485 4.3016 5 7.7483 5 3.4467 0 6.4143-2.0515 7.7483-5h3.7517v-7h-3.7517c-1.334-2.9485-4.3016-5-7.7483-5-3.4467 0-6.4143 2.0515-7.7483 5z" fill="#111" opacity=".6"/>
<path d="m11.5 16c-4.1421 0-7.5-3.3579-7.5-7.5 0-4.1421 3.3579-7.5 7.5-7.5 4.1421 0 7.5 3.3579 7.5 7.5 0 4.1421-3.3579 7.5-7.5 7.5zm0-3c2.4853 0 4.5-2.0147 4.5-4.5 0-2.4853-2.0147-4.5-4.5-4.5-2.4853 0-4.5 2.0147-4.5 4.5 0 2.4853 2.0147 4.5 4.5 4.5z" fill="#717065"/>
<rect x="1" y="6" width="21" height="5" fill="#717065"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 619 B

View file

@ -0,0 +1,7 @@
<svg viewBox="0 0 17 13" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m2.4982 4c0.97956-2.349 3.2979-4 6.0018-4 2.704 0 5.0223 1.651 6.0018 4h2.4982v5h-2.4982c-0.97956 2.349-3.2979 4-6.0018 4-2.7039 0-5.0223-1.651-6.0018-4h-2.4982v-5h2.4982z" fill="#111" opacity=".6"/>
<path d="m8.5 12c-3.0376 0-5.5-2.4624-5.5-5.5s2.4624-5.5 5.5-5.5c3.0376 0 5.5 2.4624 5.5 5.5s-2.4624 5.5-5.5 5.5zm0-2c1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5c-1.933 0-3.5 1.567-3.5 3.5s1.567 3.5 3.5 3.5z" fill="#717065"/>
<rect x="1" y="5" width="15" height="3" fill="#717065"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 578 B

View file

@ -430,8 +430,8 @@ node|z13[railway=station][transport=subway][city=london] {icon-image: subway-lon
node|z14[railway=station][transport=subway][city=london] {icon-image: subway-london-s.svg;}
node|z15-16[railway=station][transport=subway][city=london] {icon-image: subway-london-m.svg;}
node|z17-[railway=station][transport=subway][city=london] {icon-image: subway-london-m.svg;}
node|z16-17[railway=subway_entrance][city=london] {icon-image: subway-london-s.svg;}
node|z18-[railway=subway_entrance][city=london] {icon-image: subway-london-m.svg;}
node|z16-17[railway=subway_entrance][city=london] {icon-image: subway_entrance-london-s.svg;}
node|z18-[railway=subway_entrance][city=london] {icon-image: subway_entrance-london-m.svg;}
/* Los Angeles Subway Station */
node|z13[railway=station][transport=subway][city=la] {icon-image: subway-losangeles-s.svg;icon-min-distance: 1;}
@ -904,3 +904,13 @@ node|z15-16[railway=station][transport=subway][city=yokohama] {icon-image: subwa
node|z17-[railway=station][transport=subway][city=yokohama] {icon-image: subway-yokohama-m.svg;}
node|z16-[railway=subway_entrance][city=yokohama] {icon-image: subway-yokohama-s.svg;}
/* LIGHT RAIL */
/* London Light Rail Station (DLR) */
node|z12-14[railway=station][station=light_rail][city=london] {icon-image: light_rail-dlr-london-s.svg;icon-min-distance: 1;}
node|z15-[railway=station][station=light_rail][city=london] {icon-image: light_rail-dlr-london-m.svg;}
/* Porto Light Rail Station */
node|z12-14[railway=station][station=light_rail][city=porto] {icon-image: light_rail-porto-s.svg;icon-min-distance: 1;}
node|z15-[railway=station][station=light_rail][city=porto] {icon-image: light_rail-porto-m.svg;}

View file

@ -196,6 +196,8 @@ natural-water-reservoir # caption z10- (also has are
railway-station-funicular # icon z12- (also has caption(optional) z13-)
railway-station-light_rail # icon z12- (also has caption(optional) z13-)
railway-station-light_rail-london # icon z12- (also has caption(optional) z13-)
railway-station-light_rail-porto # icon z12- (also has caption(optional) z13-)
railway-station-monorail # icon z12- (also has caption(optional) z13-)
=== 2900
@ -743,6 +745,8 @@ entrance-main # icon z18- (also has captio
# railway-station-funicular # caption(optional) z13- (also has icon z12-)
# railway-station-light_rail # caption(optional) z13- (also has icon z12-)
# railway-station-light_rail-london # caption(optional) z13- (also has icon z12-)
# railway-station-light_rail-porto # caption(optional) z13- (also has icon z12-)
# railway-station-monorail # caption(optional) z13- (also has icon z12-)
# === -7100

View file

@ -441,6 +441,7 @@ string MatchCity(OsmElement const * p)
{"panama", {-79.633827, 8.880788, -79.367367, 9.149179}},
{"paris", {2.09014892578, 48.6637569323, 2.70538330078, 49.0414689141}},
{"philadelphia", {-75.276761, 39.865446, -74.964493, 40.137768}},
{"porto", {-8.707352, 41.134452, -8.541012, 41.193252}},
{"pyongyang", {125.48888, 38.780932, 126.12748, 39.298738}},
{"rennes", {-2.28897,47.934093,-1.283944,48.379636}},
{"rio", {-43.4873199463, -23.0348745407, -43.1405639648, -22.7134898498}},
@ -572,6 +573,7 @@ void PreprocessElement(OsmElement * p)
char const * layer = nullptr;
bool isSubway = false;
bool isLightRail = false;
bool isBus = false;
bool isTram = false;
@ -585,16 +587,18 @@ void PreprocessElement(OsmElement * p)
{"trolleybus", "yes", [&isBus] { isBus = true; }},
{"tram", "yes", [&isTram] { isTram = true; }},
/// @todo Unfortunatelly, it's not working in many cases (route=subway, transport=subway).
/// @todo Unfortunately, it's not working in many cases (route=subway, transport=subway).
/// Actually, it's better to process subways after feature types assignment.
{"station", "subway", [&isSubway] { isSubway = true; }},
{"station", "light_rail", [&isLightRail] { isLightRail = true; }},
});
if (!hasLayer && layer)
p->AddTag("layer", layer);
// Tag 'city' is needed for correct selection of metro icons.
if (isSubway && p->m_type == OsmElement::EntityType::Node)
if ((isSubway || isLightRail) && p->m_type == OsmElement::EntityType::Node)
{
string const city = MatchCity(p);
if (!city.empty())