Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

be more strict about line symbols that cross tile edges #3582

Closed
ansis opened this issue Jan 15, 2016 · 4 comments · Fixed by #3623
Closed

be more strict about line symbols that cross tile edges #3582

ansis opened this issue Jan 15, 2016 · 4 comments · Fixed by #3623
Assignees

Comments

@ansis
Copy link
Contributor

ansis commented Jan 15, 2016

The 395 shields are clipped:

We should check if line symbols cross tile boundaries, and if they do, prevent them from being rendered.

@jfirebaugh
Copy link
Contributor

This is specific to Still rendering mode, right? Isn't the right solution (the one that makes the behavior consistent with Continuous) to place and render the shields in both tiles?

@ansis
Copy link
Contributor Author

ansis commented Jan 15, 2016

Isn't the right solution (the one that makes the behavior consistent with Continuous) to place and render the shields in both tiles?

Unfortunately it isn't possible to place shields in the same location in both tiles using our vectortiles. The point positions for line labels are calculated by finding the points every __px along the line. Since the same line could be clipped differently in both tiles, it is pretty likely that these calculated points won't be the same in both tiles.

I think in mapnik maps we just avoid placing any line labels that cross boundaries. In the equivalent mapnik map the vertical stretch of 395 would have no shields, right @yhahn?


other ideas for fixing this:

A) If the vectortiles contained the length of the line that was clipped off of the beginning of the line, then that could be used to make the placement the same in both tiles. But that seems like a pretty huge thing to ask from the vectortiles.

B) It might be possible to fix this by changing how we turn lines into points. If we found all the points the line intersects with a tile edge and then started calculating point positions by moving in both directions then the positions would be the same. I think we'd need a larger data buffer for the road label vectortile layers though. I haven't thought carefully about this approach, but I think there would still be some broken cases.

C) Converting lines -> points before creating vector tiles for any critical layers like highway shields.

@yhahn
Copy link
Member

yhahn commented Jan 15, 2016

I think in mapnik maps we just avoid placing any line labels that cross boundaries. In the equivalent mapnik map the vertical stretch of 395 would have no shields, right @yhahn?

We rely on the style creator to make this decision, but it's really always the right decision given the limitations above.

All your FutureIdeas make sense but I think as a stopgap/triage/intermediate phase this approach would be 👍

@jfirebaugh
Copy link
Contributor

👍 Thanks for the additional details. I understand enough to agree with your and @yhahn's assessment now.

@ansis ansis self-assigned this Jan 16, 2016
ansis added a commit that referenced this issue Jan 20, 2016
ref #3582

if `symbol-avoid-edges` is true, this prevents symbols from colliding
with tile edges.
@ansis ansis changed the title be more strict about line patterns that cross tile edges be more strict about line symbols that cross tile edges Jan 20, 2016
ansis added a commit that referenced this issue Jan 21, 2016
ref #3582

if `symbol-avoid-edges` is true, this prevents symbols from colliding
with tile edges.
@ansis ansis removed the in progress label Jan 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants