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

make every zoom's tile use 4096 as extent #404

Merged
merged 6 commits into from
Dec 13, 2021
Merged

make every zoom's tile use 4096 as extent #404

merged 6 commits into from
Dec 13, 2021

Conversation

peitili
Copy link
Contributor

@peitili peitili commented Dec 10, 2021

The scale used to be 8192 in some circumstances, but we think that's not necessary so we reduce it to 4096 for all zooms.

Test

Rebuilt England area using with the change and found all zooms extent are 4096 now.

quantize_bounds = kwargs['quantize_bounds']
extent = int(round((quantize_bounds[2] - quantize_bounds[0]) /
resolution))
# quantize_bounds = kwargs['quantize_bounds']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete these instead of commenting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete these instead of commenting?

we hardcoded it to be 4096, but a better logic would be to use some of the commented out calculation; so maybe we should keep them? I added more comments/doc for this in the next commit.

@nvkelso
Copy link
Member

nvkelso commented Dec 11, 2021

In small sample tests this yields 4-5% file savings.

if cut_coord == coord:
# no need for cutting if this is the original tile.
tiles = _format_feature_layers(
processed_feature_layers, coord, nominal_zoom, formats,
unpadded_bounds, cut_scale, buffer_cfg)
unpadded_bounds, scale, buffer_cfg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth a comment that you're not using cut scale anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth a comment that you're not using cut scale anymore

added in the next commit

@peitili peitili requested review from iandees and tgrigsby-sc and removed request for tgrigsby-sc December 13, 2021 17:27
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.

5 participants