-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve maki_list.py to check for missing icons #110
Conversation
Compare local file when possible to check modified iconset (and avoid Github rate limits). Fetch openmaptiles POIs schema and compare it too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
sources_list.py
Outdated
maki_names = [x.replace('.svg', '') for x in maki_names] | ||
|
||
omt_unused = set(omt_poi_class).difference(iconset_names) | ||
omt_missing = set(iconset_names).difference(omt_poi_class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omt_missing = set(iconset_names).difference(omt_poi_class) | |
omt_missing = set(iconset_names).difference(omt_poi_class).difference(omt_poi_subclass) |
subclass
could be used for styling as well, so they are not missing in OMT.
Also there are some values which are both class
and subclass
, e.g. bar -> https://github.com/openmaptiles/openmaptiles/blob/dfd20c647c1a20e45e5ac869d3769289db17979b/layers/poi/poi.yaml#L71
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had just scratched the surface of the problem, so I pushed the script in this state as a base for future experimentations.
OSM Liberty style uses icons very basically: it's just "icon-image": "{class}_11"
.
In the future the subclass could be used, yes. But how?
- specify an icon for each subclass (or maybe for each class-subclass pair)
=> are there some features with an empty subclass? if so, do we need a fallback?
=> will we accept to duplicate lots of icons? or can we create aliases in sprite.json? - for each subclass (or class-subclass pair), create rules in the style that select an icon
...what are your thoughts?
Additional reflections:
- Other OMT layers might have point features worthy of icons (aero things for instance)
- We don't use any of the
_15
sprites!
OK, cool, no worries. But I wouldn't merge it like it is currently, because this could lead to confusion (although I find it helpful).
-> #114
-> #115 |
I have applied your suggestion, then fixed merge conflicts (the name of _15 files had changed). The source file is now poi.yaml instead of mapping.yaml. I didn't spend enough time understanding how OpenMapTiles work last time. And I still didn't spend enough time this time. The script output is now the following.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Compare local file when possible to check modified iconset (and avoid Github rate limits).
Fetch openmaptiles POIs schema and compare it too.
Output :
Another PR will try to fix some of these issues.