mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Include version number in tile-join output too
This commit is contained in:
@@ -2311,7 +2311,7 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
|||||||
ai->second.maxzoom = maxzoom;
|
ai->second.maxzoom = maxzoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
mbtiles_write_metadata(outdb, outdir, fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, forcetable, attribution, merged_lm, true, description, !prevent[P_TILE_STATS], attribute_descriptions);
|
mbtiles_write_metadata(outdb, outdir, fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, forcetable, attribution, merged_lm, true, description, !prevent[P_TILE_STATS], attribute_descriptions, "tippecanoe");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -2882,7 +2882,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
fprintf(stderr, "%s\n", VERSION);
|
fprintf(stderr, "tippecanoe %s\n", VERSION);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
|
|||||||
+3
-2
@@ -265,7 +265,7 @@ void tilestats(std::map<std::string, layermap_entry> const &layermap1, size_t el
|
|||||||
state.json_end_hash();
|
state.json_end_hash();
|
||||||
}
|
}
|
||||||
|
|
||||||
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions) {
|
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program) {
|
||||||
char *sql, *err;
|
char *sql, *err;
|
||||||
|
|
||||||
sqlite3 *db = outdb;
|
sqlite3 *db = outdb;
|
||||||
@@ -372,7 +372,8 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
|
|||||||
}
|
}
|
||||||
sqlite3_free(sql);
|
sqlite3_free(sql);
|
||||||
|
|
||||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('generator', %Q);", VERSION);
|
std::string version = program + " " + VERSION;
|
||||||
|
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('generator', %Q);", version.c_str());
|
||||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||||
fprintf(stderr, "set type: %s\n", err);
|
fprintf(stderr, "set type: %s\n", err);
|
||||||
if (!forcetable) {
|
if (!forcetable) {
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable);
|
|||||||
|
|
||||||
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size);
|
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size);
|
||||||
|
|
||||||
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions);
|
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program);
|
||||||
|
|
||||||
void mbtiles_close(sqlite3 *outdb, const char *pgm);
|
void mbtiles_close(sqlite3 *outdb, const char *pgm);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1064,7 +1064,7 @@ int main(int argc, char **argv) {
|
|||||||
name = set_name;
|
name = set_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
mbtiles_write_metadata(outdb, out_dir, name.c_str(), st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap, true, description.c_str(), !pg, attribute_descriptions);
|
mbtiles_write_metadata(outdb, out_dir, name.c_str(), st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap, true, description.c_str(), !pg, attribute_descriptions, "tile-join");
|
||||||
|
|
||||||
if (outdb != NULL) {
|
if (outdb != NULL) {
|
||||||
mbtiles_close(outdb, argv[0]);
|
mbtiles_close(outdb, argv[0]);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "tippecanoe v1.29.3"
|
#define VERSION "v1.29.3"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user