将两个 mbtiles 文件连接在一起 [英] joining together two mbtiles files
问题描述
我还没有找到将两个 *.mbtiles 文件连接在一起的方法(第一个包含 0-16 的缩放级别,第二个包含 17 的缩放级别).我正在使用不同的 sqlite 管理器,但不知道我是如何将 database2 导出和导入到 database1 的,我没有成功 - 二进制字段总是严重损坏,无法恢复 image.png.
I haven't managed to find a way to join two *.mbtiles files together (first one contains zoom level from 0-16 and second one zoom level 17). I was working with different sqlite managers, but no mather how I have exported and imported database2 into database1, I had no success - binary field was always so badly corrupted that it couldn't get image.png back.
有人知道将两个 mbtiles 文件连接在一起的简单程序吗?
Does anyone know a simple procedurte of joining two mbtiles files together?
推荐答案
如果两个文件具有相同的元数据,并且 tiles
表实际上是表而不是视图,您可以简单地附加一个到另一个表的数据:
If the two files have the same metadata, and if the tiles
tables are actually tables and not views, you can simply append the data of one to the other table:
/* open database1 as main database, then: */
ATTACH 'database2' AS db2;
INSERT INTO tiles SELECT * FROM db2.tiles;
这篇关于将两个 mbtiles 文件连接在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!