-
Notifications
You must be signed in to change notification settings - Fork 819
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
Added text-repeat-distance for highway names #3318
Added text-repeat-distance for highway names #3318
Conversation
@kocio-pl: this is the last version I did for #3295; it comprises the value of 50 you asked for residential/unclassified roads, and the decrease of These examples make me think that the current value of 200 is still too many repetitions of the name for important highways, as they change name or direction much less often than residential/unclassified ones; IMHO, 200 still displays them much more than is necessary for following such highways on the map. As you recommended 200, what do you think about this suggested increase? |
You need to fix the |
I did not ask for any change for residential roads - they look worse (incomplete) with this code: |
Ok, I'll fix the residential roads with the conflict; what about the 200 value for more important roads? |
…p-carto into increase_highways_text_distance
Reverted the |
I will review this. What value would you propose for major roads? I think every road type change needs separate consideration, at least one test rendering, because you never know and roads are important element of the map. |
I'll do some tests to find a correct value. At first glance, I would say 600 as I remember I tested this value, but, since then, you pointed some elements to care about that I did not care about back then, so I'll see what the tests suggest. BTW, good remark about testing the rendering of each road type; I would probably not have tested that. |
Great! Good testing pattern is trying not only the value you think should be right, but also something "too low" and "too high". This way I was able to detect "switch" behavior in the previous code (every global value had exactly the same effect), it also hints if bigger or smaller value might be better than first guess. |
Thanks, it will take me some time to review and test and I'm not sure if this PR should be maybe cut into separate PRs to make discussion more focused and easier to follow. What do you think about it? |
I currently use one PR because the current code uses only 2 different values for |
OK, we might try testing case by case in this PR. |
@kocio-pl: were you able to test this? |
I plan to test it soon, however piece by piece, not all at once. |
@kocio-pl What is the status of this PR? If I read it correctly, it is still in your hands? |
Yes, it's just tedious to check and there was explosion of other PRs. |
I think these repeat distance values (500 for major and 100 for minor roads) are way too big, I would go with something 10x smaller. It's enough to avoid 2 carriage roads having the same labels in the same place, but nothing more. For smaller ones I don't like to make any special changes, they are basically OK for me. Example of major roads - 2-carriage and multiple carriage way (extreme case) current code distance 500 distance 50 Example of minor roads - multiple carriage way (extreme case) current code distance 100 distance 10 |
Example of minor roads - 2 carriage way current code distance 100 distance 10 |
Example of a more typical major (2 carriage) and minor (1 carriage, small segments) roads current code distances: major 500 + minor 100 distances: major 50 + minor 10 |
@Penegal Could you update this PR? I would make some more tests to check if nothing is broken and if it will pass, I would merge it soon. |
roads.mss
Outdated
@@ -2984,9 +2994,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */ | |||
text-clip: false; | |||
text-placement: line; | |||
text-halo-radius: @standard-halo-radius; | |||
[highway = 'living_street'] { text-halo-fill: @living-street-fill; } | |||
[highway = 'living_street'] { text-halo-fill: @living-street-fill; text-repeat-distance: @major-highway-text-repeat-distance;} |
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 think that text-repeat-distance for living street should be in separate line, so the brackets should create a small inner block.
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.
Could you fix this remaining issue? Than it would ready to merge.
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.
@kocio-pl : done.
@kocio-pl : the code should now be as you asked; warn me if there are some problems left. |
It looks good now, thanks a lot! I hope this will make street experience more pleasant - at least I'm happy with the output I tested. |
Related to #497. |
That sounds like a question unrelated to this pull request, but something that achieves a similar effect is technically possible. Example from a related style that uses similar software components: https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L974 . |
This PR adds
text-repeat-distance
for highways, which currently unnecessarily clutter the map on dense areas. It uses a smaller value of 50 forhighway=unclassified
and lower-importance highways, and 200 for higher-importance highways. This also achieves the split of #3295 in smaller PR as requested by @kocio-pl, and consequently closes #3111.Before/after examples:
https://www.openstreetmap.org/#map=17/48.66397/6.17061
https://www.openstreetmap.org/#map=17/48.68110/6.14494
https://www.openstreetmap.org/#map=17/48.69825/6.18554
https://www.openstreetmap.org/#map=16/48.1898/6.4266
Edit: added links to test locations.