Skip to content
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

Unpaved rendering for turning circles #4770

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sommerluk
Copy link
Collaborator

Changes proposed in this pull request:

  • Currently, unpaved turning circles are rendered as if they were paved. This PR renders them actually as unpaved.

Test rendering with links to the example places:
https://www.openstreetmap.org/#map=19/6.53649/2.40256

Before
before

After
after

@@ -611,8 +611,14 @@ Layer:
<<: *osm2pgsql
table: &turning-circle_sql |-
(SELECT DISTINCT ON (p.way)
p.way AS way,
-- Valid line geometry requires at least two points that are NOT identical, therefore moving them slightly.
ST_MakeLine(ST_Translate(p.way, -0.0001, -0.0001), ST_Translate(p.way, 0.0001, 0.0001)) AS way,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like generating fake lines. Why can't we use a point and crop out an appropriately sized circle from the unpaved pattern?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That would mean cutting about 30 different circular SVGs from the patterns. And you would still get a discontinuity of the pattern rendering at the transit from the turning circle to the linear road.

The other alternative would be using ST_Buffer() + polygon pattern, but that would require the road width progression to be available in SQL. On the other hand, that would allow merging the turning circle and highway area layers and this way could reduce size of roads.mss quite a bit...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As @imago explained, using a point geometry

would mean cutting about 30 different circular SVGs from the patterns

Therefore, I think what is proposed in this PR is easier in code and maintenance.

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.

3 participants