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

Slimming down boundaries #1715

Closed
zerebubuth opened this issue Dec 3, 2018 · 3 comments
Closed

Slimming down boundaries #1715

zerebubuth opened this issue Dec 3, 2018 · 3 comments
Assignees
Milestone

Comments

@zerebubuth
Copy link
Member

Since tilezen/tilequeue#354 fixed a bug, we've been pulling in far more boundaries, median increase in layer size of 40%. Note that the boundaries layer is generally fairly small, and by stripping long names off (#1683) we've reduced layer size significantly at lower zooms. The increase mainly affects mid zooms 9-11, although also zoom 5 (nominal).

We annotate the boundaries with the left and right OSM IDs of the relations they delineate, but these are probably not used in styling. We could remove them to save a significant amount of space in tiles with a lot of boundaries. In addition, this would open up opportunities for merging which are not available at the moment as the left/right ID pair is nearly-unique.

As well, or instead, we could consider showing detail boundaries (kind: locality) at higher zooms (currently start at 10). The problem is that countries vary wildly in the density of their localities, so it's possible that a good value for the min_zoom in one country wouldn't be appropriate for another. Annotating with the country code and clipping might be an option, although complex.

@zerebubuth zerebubuth added this to the v1.6.0 milestone Dec 3, 2018
@zerebubuth
Copy link
Member Author

E.g: 9/285/169 (512 tile, so that's zoom 10), near Warsaw, has a lot of very detailed localities. For example, Robercin.

image

@nvkelso
Copy link
Member

nvkelso commented Dec 3, 2018

  1. I'm fine always stripping off the id from OSM and NE at low zooms (say anything that's zoom 0-12), and possibly all the way up to the maximum zoom of 15 if we really needed it (keeping id at the max zoom), for all boundaries layer features.

  2. Are we currently stripping the labels off the region lines per country as part of Strip long names from boundaries. #1700 and Strip names off most boundary lines at low and mid-zooms #1683? That also might help?

  3. Regarding stripping names off early locality boundaries lines, yes! I don't need to see those labels until zoom 13+.

  4. In addition, it looks like we start including locality boundaries lines at zoom 10 (the same zoom as counties). We can drop locality min_zoom to 11, that'll save generally on file size.

  5. There have been requests to annotate boundaries with the country code they are part of, but let's not do that right now. Happy to see a followup issue for it, though!

Back to locality names...

Here's zoom 12, the point label is enough, along with boundary line (in tiles but not shown in Bubble Wrap).

image

At zoom 13+ it's legit to show the locality names along the lines as long as they fit (drop locality kind before running fit dropping):

image

In practice, most basemaps don't show boundary lines with labels until zoom 15+ (still not shown in Bubble Wrap, but suitable for some maps styles):

image

@nvkelso
Copy link
Member

nvkelso commented Dec 17, 2018

PR #1725 looks good.

I filed 2 followup issues:

@nvkelso nvkelso closed this as completed Dec 17, 2018
@ghost ghost removed the in review label Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants