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

Write-tile-if-changed should account for zipfile metadata #152

Closed
zerebubuth opened this issue Feb 13, 2017 · 1 comment
Closed

Write-tile-if-changed should account for zipfile metadata #152

zerebubuth opened this issue Feb 13, 2017 · 1 comment
Assignees

Comments

@zerebubuth
Copy link
Member

The store.write_tile_if_changed function tries to reduce the number of writes to the store by fetching any existing tile at that coordinate from the store and only writing the new tile if they differ. Formats such as JSON or MVT contain only the data about the content of the tile, and metadata such as the file timestamp is transmitted in the HTTP headers, which aren't used in the test of whether the tiles differ.

The zipfile format used by the metatiles stores such metadata internally, meaning that if two tiles are generated at different times then they will differ, even if the tile contents are identical. This prevents the write_tile_if_changed optimisation from working.

Instead, we should add a special case for comparison of two zip files which compares only the set of tiles in the file and their contents.

@zerebubuth
Copy link
Member Author

Fixed in #153.

@ghost ghost removed the send to staging label Mar 29, 2017
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