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

Display concurrent refs as a multiline shield #750

Merged
merged 3 commits into from
Sep 5, 2014

Conversation

pnorman
Copy link
Collaborator

@pnorman pnorman commented Jul 21, 2014

This builds upon #745, but although I consider that ready to merge, the changes here need more review.

This PR changes how multiline refs are rendered. Instead of a long string split with ;, it displays each ref on its own line, as part of a taller but narrower shield.

By going to 11 characters wide, 99.2% of refs (by split numbers) will be rendered and with 4 high 99.99% will be rendered.

Some examples

image
image
image
image

Issues

  • Cross-MT shield rendering errors are more obvious. I could only find one with 2x2 metatiles and a 128 buffer, so the previous work to reduce the frequency has made them more common, but they're pretty obvious when they do happen. I couldn't find any at 256 buffer.
  • Shields with one wide ref and two or three narrow ones look imbalanced.
  • Spaces aren't removed from the outside of each ref line. I'm inclined to leave this, to push data consistency.

Overall I like the changes, and I think they set us up stylistically to tackle #596

pnorman added 2 commits July 20, 2014 19:24
This expands the shield generation script to cover multi-line shields,
and commits those shields. It doesn't yet use them.
This new SQL takes the refs for a way, splits them on ;, and rejoins
them with newlines. When doing this it also calculates the number of lines
and the length of the longest line.

Fixes gravitystorm#670 as best as possible pre-Mapnik 3.
Also fixes gravitystorm#701
@mrwojo
Copy link
Contributor

mrwojo commented Jul 21, 2014

Nice.

Does this/#745 show the refs on the Golden Gate Bridge? US 101;CA 1 (11 chars)

@pnorman
Copy link
Collaborator Author

pnorman commented Jul 21, 2014

Does this/#745 show the refs on the Golden Gate Bridge? US 101;CA 1 (11 chars)

It should, the limits on size are per line and total number of lines.

@gravitystorm
Copy link
Owner

I think it's a good way to show multiple references, given the limitations of the version of mapnik that we're using (i.e. no groupsymbolizer or similar).

However, I'm wary of doing anything that promotes semi-colon-delineated references. Where they exist, I'd rather see route relations used since semi-colon-delineation is, at best, mapper-unfriendly. So I'm going to pause this until the outcome of #596 is clear - we might well end up e.g. using this concept only for refs-from-relations, for example.

@pnorman
Copy link
Collaborator Author

pnorman commented Jul 23, 2014

However, I'm wary of doing anything that promotes semi-colon-delineated references. Where they exist, I'd rather see route relations used since semi-colon-delineation is, at best, mapper-unfriendly. So I'm going to pause this until the outcome of #596 is clear - we might well end up e.g. using this concept only for refs-from-relations, for example.

There are some fairly serious data consistency problems with refs on route relations right now. I'm not sure we can fix #596 until that's fixed.

@matthijsmelissen
Copy link
Collaborator

Assigned to @gravitystorm for deciding whether @pnorman last comment changes anything about the situation.

I also tested this, and I can confirm it works as specified.

@pnorman
Copy link
Collaborator Author

pnorman commented Aug 2, 2014

To expand on my comment, I can write SQL that solves #596, but we're probably some months off from the data being to where we can actually render that way for the main page.

@gravitystorm gravitystorm merged commit 0f77fed into gravitystorm:master Sep 5, 2014
@pnorman pnorman deleted the multiline_split_refs branch September 10, 2014 01:26
@rickmastfan67
Copy link

Paul, is there some way possible to allow sections of highway that have 4+ routes on them, have at least the first 4 routes listed in the ref tag rendered on the map?

In Georgia with their love of signing state routes with US Highways, in the Folkston area, there is a section of highway that has 7 routes on it (US 1/23/301 & GA 4/1523/121) and because of that, none of the routes get rendered. Even if just the first four of those routes can be rendered (the 3 US Highways + GA 4), it would greatly improve this area of the map. https://www.openstreetmap.org/way/52035534

If you want me to open a separate ticket for this, let me know and I will. But I just though that posting it here first would be the best place to start.

@pnorman
Copy link
Collaborator Author

pnorman commented Sep 16, 2014

If you want me to open a separate ticket for this, let me know and I will.

Yes.

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

Successfully merging this pull request may close these issues.

5 participants