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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization: Reduce size of Quadkey #90

Open
maxammann opened this issue May 9, 2022 · 2 comments
Open

Optimization: Reduce size of Quadkey #90

maxammann opened this issue May 9, 2022 · 2 comments
Labels
feature-request Request for a new feature good first issue Good for newcomers optimization Task which is not required but improves usability/performance

Comments

@maxammann
Copy link
Collaborator

maxammann commented May 9, 2022

This is an optimization without any clear benefit/problem associated -> Low Priority.

馃 Expected Behavior

馃槸 Current Behavior

The quadkey currently uses 8 bits for zoom level + MAX_ZOOM * 8 bits while it could be optimized to 8 bits for zoom level + MAX_ZOOM * 2 bits. The 2 bits define the square used in each subdivision of the quad tree, it can be NW (north west), NE (north east), SW (south west) or SE (south east).

馃拋 Possible Solution

馃敠 Context

馃捇 Examples

@maxammann maxammann added optimization Task which is not required but improves usability/performance feature-request Request for a new feature good first issue Good for newcomers labels May 9, 2022
@Drabble
Copy link
Collaborator

Drabble commented May 12, 2022

For reference:

Just FYI, I was hacking on an optimized tile ID storage a while back - see https://github.com/nyurik/planetiler-rs/blob/main/experiments/src/tile_id.rs -- essentially its a single u32 that can store all z/x/y for z in 0..=15. I might create a crate at some point that has all the basic ID features.

Originally posted by @nyurik in #87 (comment)

I think for this crate we want +15 zoom, but maybe it would be cool to have an enum between both representations.

Originally posted by @maxammann in #87 (comment)

@Drabble Drabble changed the title Optimization: Reduze size of Quadkey Optimization: Reduce size of Quadkey May 12, 2022
@maxammann
Copy link
Collaborator Author

I would like to point ant that the idea for a B-Tree + Quadkey comes from https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system#tile-coordinates-and-quadkeys

I never evaluated the performance though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature good first issue Good for newcomers optimization Task which is not required but improves usability/performance
Projects
None yet
Development

No branches or pull requests

2 participants