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

Use the NE min zoom to cull places at low zooms. #1693

Merged
merged 1 commit into from
Oct 26, 2018

Conversation

zerebubuth
Copy link
Member

We were already using the NE min zoom as the min_zoom property, but had failed to actually act on that by removing items outside of the zoom range.

Overall file size reduction (NOTE: most of the very low zoom labels come from the earth layer - things like continent labels):

Tile Previous places size (bytes) New places layer size (bytes) Percentage improvement
0/0/0 518,111 0 100%
1/0/0 139,980 0 100%
1/0/1 42,043 0 100%
1/1/0 266,788 0 100%
1/1/1 83,228 0 100%
2/0/0 - - -
2/0/1 33,015 14,536 56%
2/0/2 20,091 1,979 90%
2/0/3 - - -
2/1/0 4,326 4,091 5%
2/1/1 178,337 44,582 75%
2/1/2 58,487 20,020 66%
2/1/3 - - -
2/2/0 2,145 0 100%
2/2/1 410,712 110,756 73%
2/2/2 83,789 32,137 62%
2/2/3 - - -
2/3/0 827   100%
2/3/1 155,139 44,066 72%
2/3/2 44,228 21,546 51%
2/3/3 - - -

Zoom 0

It's all continent and ocean labels, no places visible.

z0

Zoom 1

It's all continent and ocean labels, no places visible.

z1

Zoom 2

I was expecting some places to be visible at this zoom level, as some are present in the tiles. Perhaps the label collision prevents any from appearing?

z2

Zoom 3

Looks like a pretty good selection of capitals, major cities and country labels.

z3

Zoom 4

Nice overview of US states and major cities. Do we have the same state data for Canada - given that we show the state borders, it might be nice to label them too? Perhaps a ☔ issue?

z4

…g the NE min zoom as the min_zoom property, but had failed to actually act on that by removing items outside of the zoom range.
@zerebubuth zerebubuth requested a review from nvkelso October 25, 2018 15:49
@zerebubuth
Copy link
Member Author

Connects to #1687.

Note that tile 2/2/1 is still pretty huge - 110,756 bytes. However most (69%) of this is properties, which will get better once we implement #1643.

@nvkelso
Copy link
Member

nvkelso commented Oct 25, 2018

Here's what I see in Natural Earth for these zooms:

screen shot 2018-10-25 at 09 54 31

screen shot 2018-10-25 at 09 54 47

screen shot 2018-10-25 at 09 55 01

screen shot 2018-10-25 at 09 55 35

@nvkelso
Copy link
Member

nvkelso commented Oct 25, 2018

Also, your zoom 2 looks pretty weird!?

@nvkelso
Copy link
Member

nvkelso commented Oct 25, 2018

The likely reason you're not seeing Canada region labels at zoom 3 is they are set to 3.5 and Tangram only does the evaluation at zoom 3 (and 3.5 !< 3 so it filters them out). Or your PR / existing code filters them.

Looks like this PR is doing the right thing (nominal zoom + 1), so might be in the setting of min_zoom, please ensure that's taken from Natural Earth's min_label value. (NE's min_zoom is for polygon or line visibility, while min_label is for when it separately gets labeled.)

@zerebubuth
Copy link
Member Author

Yup, zoom 2 was messed up because I was using the Go version of tapalcatl, which doesn't understand the "max zoom packing" feature/hack that we added to tapalcatl-py. Moving to the latter, I now see:

z2-again

Which is has a bunch of cities on it. 🎉

(Although no space for London? What's up with that? 🙀)

@zerebubuth zerebubuth merged commit 1000dee into master Oct 26, 2018
@zerebubuth zerebubuth deleted the zerebubuth/1687-fewer-places-at-low-zoom branch October 26, 2018 17:59
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

Successfully merging this pull request may close these issues.

2 participants