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

Some streets that are not joining may on zoom out misleadingly appear to be joining #286

Closed
matkoniecz opened this issue Dec 13, 2013 · 20 comments
Labels
roads wontfix-unfeasible Issues closed because of lack of suitable solution

Comments

@matkoniecz
Copy link
Contributor

See http://www.openstreetmap.org/?mlat=50.06873&mlon=19.91165#map=18/50.06873/19.91165 and zoom out, on levels 17, 16, 15, 14 it appears to be joining. Fixing it should be feasible at least on levels 17 and 16.

Other example may be http://tools.geofabrik.de/mc/#18/51.4990/-0.1678&num=2&mt0=mapnik&mt1=google-map (Rutland, Rutland Mews). Note that Google maps have the same problem.

@pnorman
Copy link
Collaborator

pnorman commented Dec 13, 2013

An osm2pgsql rendering database has no notion of topology, so two streets are never connected. Do you have a suggestion on how to fix this?

@matkoniecz
Copy link
Contributor Author

Unfortunately no, for now I think about default style as a black box - OSM data enters, deep magic happens and map comes out.

I have absolutely no idea how it may be fixed, beyond extremely ugly and inefficient hack like preprocessing OSM data to provide information about topology (in this case it would be adding "here_road_usable_by_motor_vehicles_ends=yes" tag). And I am even unsure whatever it would work.

@matthijsmelissen
Copy link
Collaborator

This is very annoying for navigating, but it is not clear what the desired behaviour is, and I don't think we have a way to solve this with Mapnik/CartoCSS. I will therefore close this issue.

@matkoniecz
Copy link
Contributor Author

Desired behaviour is clear, there should be a visible barrier between misleadingly joining streets.

bez tytulu

@matthijsmelissen
Copy link
Collaborator

Does anyone have any idea how to accomplish such barrier?

@pnorman
Copy link
Collaborator

pnorman commented Aug 21, 2014

I'm pretty sure it's not possible, given the lack of topology.

@matkoniecz matkoniecz added the wontfix-unfeasible Issues closed because of lack of suitable solution label Oct 19, 2014
@kocio-pl
Copy link
Collaborator

Maybe rendering noexit=yes would be useful here? We could for example render such road end as rectangle instead of a default circle/arch.

@matkoniecz
Copy link
Contributor Author

@kocio-pl

http://wiki.openstreetmap.org/wiki/Key:noexit

Use the noexit=yes tag at the end of a highway=* to indicate that there is no possibility to travel further by any transport mode along a formal path or route.

For example in that case one may travel further on foot (see http://www.openstreetmap.org/?mlat=50.06873&mlon=19.91165#map=19/50.06867/19.91185 - road is touching footway as visible on https://www.google.pl/maps/@50.068822,19.911596,3a,75y,207.97h,79.85t/data=!3m4!1e1!3m2!1sDLjr_acb3dq4OQyWQNPFxg!2e0 ).

@kocio-pl
Copy link
Collaborator

I think if noexit=yes tag is used, we should assume the tagging is right and we can act accordingly, so we would catch at least all the clear cases.

This example is probably not a candidate for using such tagging, so we may not able to show it. However it seems this is special case when the footway is not separate (which makes this part a highway=living_street or a service area IMO). If only the footway was separate, that would be dead end. Or the tagging scheme should be extended to recognize also other values than "yes" (like noexit=motor_vehicle).

Another approach may be software analyzing if the node is terminating a highway and render it the same as tagged dead end. It is more costly, of course, in terms of computing power. However if we will not try that hard and take only tagged dead ends, it should be an improvement, because noexit=yes has 360 916 uses. Probably only part of them looks like a (false) junction, but changing rendering will do no harm.

@pmailkeey
Copy link

Hi debaters,

Firstly, there should be no problem terminating dead-end roads squarely - so the roundy bit doesn't protrude onto a nearby road. It should also be possible to shorten the dead-end road by half a road width so as one zooms out, the 'gap' gets bigger - but more of it gets covered by the fatter road equalising out the effect so that the gap remains clearly visible.

That's tackling the issue from the 'dead-end' point of view and will solve peculiarities like:
image

The following vert/horiz roads:
image

are not connected yet they appear to be rendered as such.

Surely they should render as:
image

It should be possible to render 'edge gaps' at connected nodes but not between nodes ?

@matkoniecz
Copy link
Contributor Author

there should be no problem terminating dead-end roads squarely

Unfortunately - it is a problem. As @pnorman already mentioned

I'm pretty sure it's not possible, given the lack of topology.

In other words: it may be done for for either all ways or for none, it is impossible* to do things like "ways that end and are not followed by another way should be displayed differently".

*strictly speaking - not proved to be impossible but nobody has any idea how it may be done.

@pnorman
Copy link
Collaborator

pnorman commented Apr 30, 2015

Firstly, there should be no problem terminating dead-end roads squarely - so the roundy bit doesn't protrude onto a nearby road. It should also be possible to shorten the dead-end road by half a road width so as one zooms out, the 'gap' gets bigger - but more of it gets covered by the fatter road equalising out the effect so that the gap remains clearly visible.

If it should be no problem, please supply a pull request as neither myself nor @math1985 see a possible way.

@pmailkeey
Copy link

Better ask your runway designers - they achieve square (actually mitred) ends:

image

Just a case of rendering lines with mitred (or square) ends instead of round ones - basic buggering about with lines stuff. If there's a desperate need of rounded-end segments, that could be built into the node.

@pmailkeey
Copy link

Possibly another option could be a terminating node - like 'turning circle' but trims back the extent of the line and squares it off

@matthijsmelissen
Copy link
Collaborator

Just a case of rendering lines with mitred (or square) ends instead of round ones - basic buggering about with lines stuff.

That would give us rendering artefacts like this:

screenshot from 2015-05-01 01 20 27
screenshot from 2015-05-01 01 20 23

Unfortunately it's not as simple as you propose (as these pictures demonstrate).

@pnorman
Copy link
Collaborator

pnorman commented May 1, 2015

Locking, as any change from wontfix would have to be accomplished by a pull request (i.e. code).

Repository owner locked and limited conversation to collaborators May 1, 2015
Repository owner unlocked this conversation May 1, 2015
@matthijsmelissen
Copy link
Collaborator

Unlocked, because I think educating others about how CartoCSS and this particular style works is also useful.

Here @pmailkeey suggests mitred line-ends. I don't think that's supported in CartoCSS though?

The other suggestion was to look at terminating nodes. How would we determine what a terminating node is, though? It doesn't seem that there is a straightforward way to do. In particular, the database has not enough information to distinguish a road terminating on a crossing it's not connected to from a road terminating on a crossing it is connected to.

@matkoniecz
Copy link
Contributor Author

look at terminating nodes

AFAIK this is impossible ("osm2pgsql rendering database has no notion of topology, so two streets are never connected").

@pmailkeey
Copy link

A turning circle can be used as a terminating node - it modifies the end of the line. It's up to us to apply a terminating node where necessary - i.e. to avoid an apparent connection forming.

I started this in the iD discussion - wondering if a line could be shortened automatically to avoid it looking connected to another road. However, it was 'pointed out' that it's a rendering issue really - caused by lines having a width. So even 'terminating nodes' is really a bodge. It's something the renderer should deal with automatically.

It appears that roads visually connect when they meet. I don't know what causes this but it'd be nice if the effect was removed at all places other than connecting nodes - if possible !

Repository owner locked and limited conversation to collaborators May 1, 2015
@gravitystorm
Copy link
Owner

Locked again. This conversation simply isn't going to progress to a solution. It's a HARD problem.

If you want to talk endlessly, please use the mailing lists. If you are interested in solving the problem, then please read all the conversation above, think about it, and propose your solution in the form of a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roads wontfix-unfeasible Issues closed because of lack of suitable solution
Projects
None yet
Development

No branches or pull requests

6 participants