Custom subway icons #3514
No reviewers
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#3514
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "warsaw_subway"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See #3509
@vng can't we map icons directly to the value of the network tag? Then we don't need any additional code for it. Our icons system should support even Cyrillic names for icons, no?
Another thing to tackle which might be fixed by changing approach are redundant translations: https://github.com/organicmaps/organicmaps/blob/master/data/strings/types_strings.txt#L17132-L17504
Translations now can use ref = to the base type, to avoid copy-pasting.
@biodranik Well, MatchCity by rect is more universal way. That's why I put todo to remove matching by network code.
network values are always fancy and should be added manually for each city.
@starsep
And also you should create 2 separate commits: 1 - Your edits. 2 - Styles regenerated commit.
I will handle 2. and 3. in the evening
Hm, Subways.mapcss already have needed rules, we have needed icons.
The only thing is to add new types into mapcss-mapping.csv
Should we add only Warsaw, or all available cities with a bulk change ;)
I made Warsaw change in two commits. I regenerated mwm file and icons work correctly.
In Subways.mapcss there are 105 cities.
In mapcss-mapping.csv there 12 cities.
Bulk edit would mean extra 2*(105-12)=186 types
At the moment there are 374
deprecated|deprecated
types, so it's enough to only replace deprecated one.I can work on a bulk change.
Is it important to keep subway types close together? I can take first 186 first deprecated types for example.
Just speculating, please correct me if I am wrong: number in mapcss-mapping.csv is used as some kind of type id in mwm file. And it cannot be changed to keep backwards compatibilty with old map files.
Rebuilding index only i.e.
generator_tool --generate_index=true
wouldn't work here to test all cities affected, right?To test every city I should either regenerate all map files (takes a ton of time) or make a final testing just before release once new maps are generated?
I'll throw my 5 cents here: how many unique transport lines (not only the metro!) with unique icons are there in the world? Is it the best approach to manually hardcode them in types? Isn't it prone to mistakes?
What about other icons unique per country level (e.g. a driving training school sign)? What approach can be applied there? What other per-country icons are there?
Are there any alternative approaches? E.g. store the type/icon/network in the feature's metadata?
@biodranik
I pushed commit with missing city subway types (and styles regenerated afterwards). Generated with:
Holy moly ;) Your efforts are impressive :)
I'd like to keep deprecates numbers from 0 to 700 reserved for more useful types. Generic rule is less number -> more frequent type. Can you put this subways starting from say deprecated id = 747 and below ..
@biodranik @rtsisyk Are you ok if we will make bulk insert of all existing city metro icon types?
Or even put this types to the bottom of mapcss-mapping.csv. I couldn't imagine that you will make this bulk insert ;)
Why lower ids are reserved for useful types? Just a convention or is some dynamic length binary coding used?
I put them on the bottom, generated with:
Test failed: https://github.com/organicmaps/organicmaps/actions/runs/3185151162/jobs/5194386832
At first I thought tests take longer now due to extra types but previous jobs take even more time. I guess it's unrelated to my change.
Failed test say that:
I suppose that night icons was made from clear ones using some color/opacity transformation.
Is it possible to get Hamburg or Munchen svg metro icons somewhere? Why did you include this cities into your list?
I simply took all missing cities with styling defined in https://github.com/organicmaps/organicmaps/blob/master/data/styles/clear/include/Subways.mapcss
I will try to find those icons, if I won't be able to do so I will remove those types.
There is general icon U-Bahn in Germany
https://commons.m.wikimedia.org/wiki/File:U-Bahn.svg
@AlertSubject perhaps you can find more specific icons or is this general one used in those cities? I think it is in Hamburg, I haven't been to Munich.
Yeah this is indeed the one for Hamburg

But I've never seen it used on the map
This is a U-Bahn Station in Hamburg and there is no specific icon displayed sadly
Neither is the S-Bahn icon
And I believe the S-Bahn icon is used all over Germany as they are operated by Deutsche Bahn
So make sense to rename subway-berlin icon to subway-ubahn and add Berlin, Munchen, Hamburg types manually with reference to subway-ubahn.
https://commons.m.wikimedia.org/wiki/Category:S-Bahn_logos
Here's a list of some German S-Bahn icons
Hamburg is in there as well for example
Berlin too
I renamed subway-wien to subway-vienna. I made night version icons by transforming clear (day) ones.
I made ubahn icon out wikimedia svg and used it for Hamburg and Munich
To get night icon from clear icon: opacity is changed from 0.6 to 0.4 and color is multiplied by some factor ~0.6
missed [3: subway-bilbao-m subway-bilbao-s subway-lausanne-s ]
I don't know what to do with Metro Bilbao Logo: https://en.wikipedia.org/wiki/File:Logo_Metro_Bilbao.svg
I will make subway-lausanne-s by transforming subway-lausanne-m
Also subway-lausanne-m.svg doesn't have corresponding -s version ..
I think, we can just rename berlin icon to ubahn, no?
Almost the same, I can remove subway-berlin and use subway-ubahn for Berlin.
They seem to have the same background color
Sure, I can use Berlin icon as ubahn as well
I missed opacity, I will fix that
To clarify, github shows me this:

I think, better to rename existing Berlin, instead of adding the new one.
Berlin icon renamed to U-Bahn, subway-lausanne-s created from subway-lausanne-m.
Only Bilbao missing: https://en.wikipedia.org/wiki/File:Logo_Metro_Bilbao.svg
Bad change here. "ion"
Thanks for spotting that, fixed!
Great! Let see what CI checks will show. Also:
Can you please show several screenshots of how it looks now on the map? I'm afraid the map becomes less readable/intuitive. Of course, all local people know metro symbols. But what about travellers? When you come into some city, and want to find the closest metro on the map, how can you understand that it's some, say, 'S' symbol?
I can make some screenshots tomorrow. I think most of them are variants of M. I didn't add S Bahn icon.
As a traveller I would first turn on subway layer to see what lines are in the city. I think those icons allow to find subway station nearby easier without turning a layer or searching.
For Bilbao, you can use just the red rings. I've lived there and it is the only logo on metro entrances.
The S symbol on green background is found in all the train stations and all the trains. It's shown on all the boards that navigate you to the train platforms
I'm pretty sure a visitor will quickly recognize the familiar symbol and be glad to see it on the map
I've reviewed and fixed Portuguese strings. Looks good to me!
@biodranik You can check it now for some major cities:




Moreover, I'd prefer to draw small metro icons 1 zoom level earlier. Look how good it looks in Moscow, want to tap this icon first ;)

@matheusgomesms
You should modify only
type.railway.station.subway
andtype.railway.subway_entrance
in a file data/strings/types_strings.txtAll
type.railway.station.subway.$city
andtype.railway.subway_entrance.$city
strings use the value of base type. All strings.txt (for Android) and Localizable.strings (for iOS) are generated automatically. See https://github.com/organicmaps/organicmaps/blob/master/docs/TRANSLATIONS.md for more details.I am sorry that you lost some time, I will apply your suggestions in the evening. I had no intention of asking translations-* groups for review, they have been added automatically due to modification of relevant files.
@vng thanks for screenshots!
Rebased and regenerated
@matheusgomesms I added your Portuguese fixes here: b4eb2df3bc7a9bbdf5a677fe16a9958749454035
Hi @starsep thanks for that! Just wanted to point out that the PT-BR fix is still missing. These are the correct strings:
data/strings/types_strings.txt
line 16674: pt-BR = Estação de metrô
line 17075: pt-BR = Entrada do metrô
Could you please fix that? I couldn't do it by myself, unfortunately.
In Simplified Chinese, I'd prefer use "地铁出入口" for "Subway Entrance", if we don't clarify enter or exit behavior.
@ -1276,30 +1276,226 @@
<string name="type.railway.station">火車站</string>
@s8321414
↑ native speaker of Traditional Chinese
I guess he'll prefer "捷運車站" more than "地鐵車站", so I call him for help and waiting for advice.
@vng thanks for the screenshots. As I expected, the map looks a bit polluted. The good news is that it can be workarounded now by reducing the size of all metro icons on observation zoom levels.
Google draws small icons on observation zoom levels and increases their size when you zoom in, Apple draws dots until you zoom in to almost the max zoom level. Check it yourself and compare.
Metro icons on a "general", universal map style should not pollute it, we'll implement a public transport style for that later.
@biodranik This is a current prod screenshots and generic metro icon vs individual metro icons - "pollution" will be the same or even worse with generic icon.
@starsep Let remove Bilbao because we don't have icons for it. Also, please, take into account Chinese comments.
@ -1276,30 +1276,226 @@
<string name="type.railway.station">火車站</string>
For subway station, we use 「捷運站」or「捷運車站」 in Taiwan.
Just replied :-)
organicmaps/organicmaps#3514
Please see my comment about Bilbao.
@matheusgomesms
I removed Bilbao for now. We could theoretically use this icon: https://commons.wikimedia.org/wiki/File:S%C3%ADmbolo_del_Metro_de_Bilbao.svg but it's really cryptic
I added pt-BR translations in
9dbfbd2a1d
@vng @s8321414 @LaoshuBaby
I changed Chinese translations in
e258802476
Style/symbols/strings regenerated
Good! mapcss-mapping.csv should not renumber existing types, so separate Bilbao commit is weird. Better to squash it into first main commit.
Has someone added Hamburg as well?
I believe Berlin is included in this latest update
Have any other cities been added?
Berlin and Hamburg use S-Bahn icon.
Many more cities have been added: adana, algiers, almaty, amsterdam, ankara, athens, baku, bangkok, beijing, bengalore, brasilia, brescia, brussels, bucharest, budapest, buenos_aires, bursa, cairo, caracas, catania, changchun, chengdu, chicago, chongqing, dalian, delhi, dnepro, dubai, ekb, fukuoka, glasgow, guangzhou, hamburg, helsinki, hiroshima, isfahan, istanbul, izmir, kazan, kharkiv, kobe, kolkata, kunming, kyoto, la, lausanne, lille, lima, lisboa, lisbon, lyon, malaga, manila, maracaibo, mashhad, mecca, medellin, mexico, milan, montreal, munchen, nagoya, nnov, novosibirsk, osaka, oslo, palma, panama, philadelphia, pyongyang, rennes, rio, rotterdam, samara, santiago, santo_domingo, saopaulo, sapporo, sendai, sf, shanghai, shiraz, sofia, stockholm, tabriz, taipei, taoyuan, tashkent, tbilisi, tianjin, tokyo, valencia, vienna, washington, wuhan, yerevan, yokohama,
I see the U-Bahn logo on a station that only has ubahn lines going through
But I don't see any S-Bahn icon as of now
Is this due to multiple different lines using the same station or what conditions have to be met at the osm data level?
At the moment we don't have icon rendering for S-Bahn.
For U-Bahn in Hamburg it's
[railway=station][transport=subway][city=hamburg]
.In OSM tags I think it's
railway=station
+station=subway
+ bbox for HamburgShould I create a new issue and link to the logo within it?
I would also recommend adding Porto Metro logo. The other cities looked very nice! Congrats on the work done!