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

Render roads that go across a junction on top #832

Closed
matthijsmelissen opened this issue Aug 3, 2014 · 14 comments

Comments

Projects
None yet
6 participants
@matthijsmelissen
Copy link
Collaborator

commented Aug 3, 2014

Perhaps we should render roads that go through a node on top of roads that end at that road node.

See also https://trac.openstreetmap.org/ticket/2992.

@pnorman

This comment has been minimized.

Copy link
Collaborator

commented Aug 4, 2014

Perhaps we should render roads that go through a node on top of roads that end at that road.

Not sure what you mean where. Can you rephrase?

@matthijsmelissen

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 4, 2014

In a T-crossing, the road that goes through the junction should be on top of the leg of the T.

@sommerluk

This comment has been minimized.

Copy link
Collaborator

commented Aug 7, 2014

+1

@gravitystorm

This comment has been minimized.

Copy link
Owner

commented Aug 7, 2014

I'm not sure that'll work in every case. For example, if a primary road changes name at a crossroads with the middle of a residential road, we don't want to render the residential road on top even though it's the one that 'continues' through the junction.

@dieterdreist

This comment has been minimized.

Copy link

commented Aug 7, 2014

2014-08-07 18:53 GMT+02:00 Andy Allan notifications@github.com:

I'm not sure that'll work in every case. For example, if a primary road
changes name at a crossroads with the middle of a residential road, we
don't want to render the residential road on top even though it's the one
that 'continues' through the junction.

usually you won't say that it continues I think (at least not in my
language). "continue" in this case would be turn to keep on the primary,
and it could be mapped (micromapping detail) accordingly (rather then
having a 90° sharp bend for the primary it could be smooth like it is in
reality and the residential road entering the primary could also be
articulated to be the one entering the other road). In actual osm mapping
this is often not done yet, I agree, but I think it is desirable for a
"scale less" map like ours to catch these details and develop an
appropriate (drawing) language to articulate these details.

@matthijsmelissen

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 7, 2014

I'm skeptical about this PR.

Do we have an example of a situation where this would be an improvement?

@sommerluk

This comment has been minimized.

Copy link
Collaborator

commented Aug 7, 2014

Yes, here http://www.openstreetmap.org/#map=17/5.33960/-4.08355 at zoom level 17. (However, at zoom level 18 it looks like this is yet done.)

But there are other cases like http://www.openstreetmap.org/#map=18/5.37733/-3.96823 where this would be an improvement at 17 and at 18.

@sommerluk

This comment has been minimized.

Copy link
Collaborator

commented Aug 7, 2014

Idea: Give 1 point for every osm way that ends at a given node. Give 2 points for every osm way that crosses the node. Now go from top (highway=motorway) to bottom (highway=service): If the sum of all points of the current highway type + all points of all higher highway types is >= 2, than this is the highway type that should get rendered above the others.

Example 1: The primary road from north will be a residential road to south. The tertiary road crosses from west to est. The tertiary road "wins".

      P
      P
TTTTTTTTTTTTT
      R
      R

Example 2: The primary road ends. The tertiary road crosses from west to est. The tertiary road "wins".

      P
      P
TTTTTTTTTTTTT

Example 3: The primary road from north will be a secondary road to south. The tertiary road crosses from west to est. The secondary road "wins".

      P
      P
TTTTTTSTTTTTT
      S
      S
@Klumbumbus

This comment has been minimized.

Copy link

commented Aug 7, 2014

However, at zoom level 18 it looks like this is yet done.

This is bug #862.

@Klumbumbus

This comment has been minimized.

Copy link

commented Aug 7, 2014

Example 3: The primary road from north will be a secondary road to south. The tertiary road crosses from west to est. The secondary road "wins".

Would't it look better if tertiary wins in this situation?

Also consider Situations like this

@sommerluk

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2014

[EDITED]

Example 3: The primary road from north will be a secondary road to south. The tertiary road crosses from west to est. The secondary road "wins".

Would't it look better if tertiary wins in this situation?

Yes, probably.

Also consider Situations like this

Well, here secondary would win:

motorway → 0 ways → 0 points → continue
primary → 0 ways → 0 points motorway + 0 points primary → continue
secondary → 2 ways that end here, each with 1 point → 0 points motorway + 0 points primary + 2 points secondary → render secondary on top of others.

So we would have the same result than currently, which is fine.

But the algorithem has other short-comings:

Example 4: The primary road coming from north is a dual carrigeway. It continues as a tertiary road with a single carrigeway direction south. From west to east we have a tertiary. Primary would win.

   P   P
   P   P
    P P
TTTTTPTTTTT
     T
     T

Here, it would indeed be nicer if tertiary would win. The algorithm was just an idea to start the discussion… (Also, I’m not sure if something like this would be to complicate for CartoCSS?)

@pnorman

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2014

Also, I’m not sure if something like this would be to complicate for CartoCSS

We only have geometries in the database, not any topological information. Unless you can frame any criteria in purely geometric terms, we can close it as unfixable within the scope of this project.

Chapter 8.8 of the PostGIS manual may help, as well as ST_Relate and the DE-9IM.

@pnorman

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2014

Thinking about it more, this inherently unsolvable.

Take this as an example desired rendering

PPPPSSSS
   P   S
   PPPPSSSS

It requires the primary to be on top at one intersection and on the bottom at another.

@pnorman pnorman closed this Aug 8, 2014

@matthijsmelissen

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 8, 2014

To clarify, both roads in @pnorman's example are mapped as a single way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.