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

Diagonal labels take too much space #1645

Closed
mourner opened this issue Jul 23, 2013 · 6 comments
Closed

Diagonal labels take too much space #1645

mourner opened this issue Jul 23, 2013 · 6 comments

Comments

@mourner
Copy link
Contributor

mourner commented Jul 23, 2013

Copied from #1641

I also noticed that diagonal lines are covered by one big rectangle, and that means that a lot of labels that could be drawn aren't because of false positives. In Kothic JS, we cover diagonal lines by a set of small offset rectangles, and I think you should try the same. Because of bulk insertion, it shouldn't affect performance much.

@jfirebaugh
Copy link
Member

Can you give an example? I was having a hard time seeing this.

@mourner
Copy link
Contributor Author

mourner commented Jul 23, 2013

OK, here's how all line labels are currently put in RTree for collision detection:

rectcov1

And here's how we could improve that to make more room for other labels:

restcov2

It may not be very noticeable on grid-like cities like Washington, but on cities with more chaotic street placement the effect will be more pronounced.

@mourner
Copy link
Contributor Author

mourner commented Jul 24, 2013

Here's a Kothic screenshot to illustrate how collisions are handled there (notice the non-grid like street pattern with lots of labels along curvy paths and how many labels fit on the map).

screen shot 2013-07-24 at 17 04 41

@bhousel
Copy link
Member

bhousel commented Apr 17, 2016

whoa, I had a hunch about the area labels being off, but iD's collision boxes are worse than I realized:

screenshot 2016-04-17 00 29 07

@mourner
Copy link
Contributor Author

mourner commented Apr 17, 2016

Wow. If you decide to tackle this, you can reuse some rectangle covering code from GL JS.

@bhousel
Copy link
Member

bhousel commented Oct 18, 2016

I did this today, looks pretty cool!

screen shot 2016-10-18 at 2 08 08 pm

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

No branches or pull requests

3 participants