Skip to content

Unpaved rendering for turning circles / mini-roundabouts #5069

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dch0ph
Copy link
Contributor

@dch0ph dch0ph commented Feb 22, 2025

Closes #4770.

Changes proposed in this pull request:

Test examples are difficult to find, and subtle issues associated with mini roundabouts are best illustrated with a pseudo-legend:

image

Notes:

  • As in Unpaved rendering for turning circles #4770, an artificial line of negligible length is used to work around mapnik limitations (the line patterns used for unpaved rendering cannot be applied to nodes)
  • The surface of a mini-roundabout / turning circle is not generally specified, and is instead determined from the way(s) involved. As in Unpaved rendering for turning circles #4770, the paved/rendering at mini roundabouts is determined by the highest priority road (1st and 2nd examples above). In the case of equal priority, paved (no pattern) is preferred (third example above).

For discussion:

  • We could introduce a CTE so that the MSS for paved receives a normal node rather than an artificial way. This may be slightly less hacky.
  • It would make sense to use functions to determine the paved status, rather than duplicate code between SQL queries.

Copy link
Collaborator

@imagico imagico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fairly good - but i think two technical changes would be advisable:

  • layers should get geometry: linestring
  • the int_surface generation could be moved into a subquery and can then be used for the ORDER BY without repeating the value list.

I am also wondering if - since you generate a line geometry for all turning circles anyway it might make sense to use line symbolizers also for the paved version instead of marker symbolizers. This would make the code slightly shorter (no separate marker-width/marker-height required).

dch0ph added 2 commits March 24, 2025 18:44
Use line rather than marker for both paved and unpaved
Avoid duplication in SQL selection
@dch0ph
Copy link
Contributor Author

dch0ph commented Mar 26, 2025

Changes made.

image

There are minor unexpected changes in switching all the rendering to line based in the PDF output above (slightly thicker casing on roundabout in 2nd example), but this is confined to the PDF output, and there are no changes in the raster output. A couple of examples at Z16:
image
image

The simpler and more consistent code is an advantage on balance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants