Include a creator field in tileset metadata with the Tippecanoe version

Also finally eradicates binary diffs from the tests
This commit is contained in:
Eric Fischer
2018-06-07 11:20:12 -07:00
parent 9f1913bc37
commit 11c6c869aa
47 changed files with 3697 additions and 79 deletions
+10
View File
@@ -17,6 +17,7 @@
#include "text.hpp"
#include "milo/dtoa_milo.h"
#include "write_json.hpp"
#include "version.hpp"
sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable) {
sqlite3 *outdb;
@@ -371,6 +372,15 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
}
sqlite3_free(sql);
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('creator', %Q);", VERSION);
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
fprintf(stderr, "set type: %s\n", err);
if (!forcetable) {
exit(EXIT_FAILURE);
}
}
sqlite3_free(sql);
if (vector) {
size_t elements = 100;
std::string buf;