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

MBTilesTileStore deduplication #43

Open
fredj opened this issue Apr 20, 2012 · 2 comments
Open

MBTilesTileStore deduplication #43

fredj opened this issue Apr 20, 2012 · 2 comments

Comments

@fredj
Copy link
Member

fredj commented Apr 20, 2012

Using view, see https://github.com/mapbox/node-mbtiles/blob/master/bin/mbcompact

@elemoine
Copy link
Contributor

I'm curious to understand what this issue means.

@fredj
Copy link
Member Author

fredj commented Apr 20, 2012

The idea is be able to "compress" a mbtile file by not storing the same tile data again and again.

Instead of having a tiles table, we have a map table that stores the tile coordinates and the md5 checksum of the data and an images table that stores the same checksum and the actual data.
The tiles is replaced by a view.

When inserting a new tile, md5(tile.data) is computed and the data is inserted into images only if not already present.

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

2 participants