-
Notifications
You must be signed in to change notification settings - Fork 3
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
Error writing spatial metadata to MBTiles file #32
Comments
On the metadata: There was a bug with how the metadata is written to the mbtiles file that is getting fixed in #33. See that ticket for more information about what the bug was. On the database schema: We use a database schema that stores the tile data in a separate table keyed by the hash of the data, allowing us to deduplicate data. The table required by the mbtiles spec is realized using a view that joins the data with its hash and the tile ID. On large (~more than a few thousand tiles) tilesets, the chance of duplication is pretty high, and it saves a lot of storage space to do this deduplication. |
This should be resolved. Please reopen or file a new issue if you find something else wrong. |
Amazing work! Thanks so much for your help on this 🙏 The deduplication via a view is a very neat trick, thanks for explaining 😄 This got me wondering if I could use the same MBTiles file also as an "BigPlanet" db supported by OSMAnd, simply by adding a view for the required table structure |
First of all, thanks for this lib! It's ridiculously fast at downloading tiles - I'm impressed 😄
Failure writing metadata
.mbtiles
file.Command:
(am I missing something in the command?)
Output:
In can see the (presumed) gzipped images in the SQLite database table:
The error is here:
go-tilepacks/tilepack/mbtiles_outputter.go
Line 115 in fd9e5ed
Failing at the SQL command:
INSERT OR REPLACE INTO metadata (name, value) VALUES(?, ?)
because the database is closed already?MBTiles database format
On a side note, perhaps I also have a knowledge gap around the mbtiles spec, but I thought they were required to have database tables
metadata
andtiles
with columns as such:However, the final mbtiles file has tables
metadata
,images
, andmap
, with images having structure:And
map
having structure:This is probably intended, so please forgive my ignorance if so 🙏
But either way, I can't verify due to the metadata issue above!
The text was updated successfully, but these errors were encountered: