mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 17:35:42 +02:00
Tilestats metadata no longer needs to be limited to 60K
This commit is contained in:
+1
-8
@@ -416,7 +416,7 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
|
|||||||
size_t elements = 100;
|
size_t elements = 100;
|
||||||
std::string buf;
|
std::string buf;
|
||||||
|
|
||||||
while (1) {
|
{
|
||||||
buf = "{";
|
buf = "{";
|
||||||
aprintf(&buf, "\"vector_layers\": [ ");
|
aprintf(&buf, "\"vector_layers\": [ ");
|
||||||
|
|
||||||
@@ -472,13 +472,6 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
|
|||||||
}
|
}
|
||||||
|
|
||||||
aprintf(&buf, "}");
|
aprintf(&buf, "}");
|
||||||
|
|
||||||
if (buf.size() >= 60 * 1024 && elements > 0) {
|
|
||||||
elements = elements / 2;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('json', %Q);", buf.c_str());
|
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('json', %Q);", buf.c_str());
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user