mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-01 08:47:57 +00:00
Merge pull request #656 from mapbox/tile-join-maxzoom
Warn in tile-join if tilesets being joined have different maxzooms
This commit is contained in:
commit
b8ffdda32e
@ -1,3 +1,7 @@
|
|||||||
|
## 1.32.2
|
||||||
|
|
||||||
|
* Warn in tile-join if tilesets being joined have inconsistent maxzooms
|
||||||
|
|
||||||
## 1.32.1
|
## 1.32.1
|
||||||
|
|
||||||
* Fix null pointer crash when reading filter output that does not
|
* Fix null pointer crash when reading filter output that does not
|
||||||
|
@ -363,6 +363,7 @@ struct reader {
|
|||||||
|
|
||||||
std::vector<zxy> dirtiles;
|
std::vector<zxy> dirtiles;
|
||||||
std::string dirbase;
|
std::string dirbase;
|
||||||
|
std::string name;
|
||||||
|
|
||||||
sqlite3 *db = NULL;
|
sqlite3 *db = NULL;
|
||||||
sqlite3_stmt *stmt = NULL;
|
sqlite3_stmt *stmt = NULL;
|
||||||
@ -400,8 +401,9 @@ struct reader {
|
|||||||
|
|
||||||
struct reader *begin_reading(char *fname) {
|
struct reader *begin_reading(char *fname) {
|
||||||
struct reader *r = new reader;
|
struct reader *r = new reader;
|
||||||
struct stat st;
|
r->name = fname;
|
||||||
|
|
||||||
|
struct stat st;
|
||||||
if (stat(fname, &st) == 0 && (st.st_mode & S_IFDIR) != 0) {
|
if (stat(fname, &st) == 0 && (st.st_mode & S_IFDIR) != 0) {
|
||||||
r->db = NULL;
|
r->db = NULL;
|
||||||
r->stmt = NULL;
|
r->stmt = NULL;
|
||||||
@ -735,6 +737,11 @@ void decode(struct reader *readers, std::map<std::string, layermap_entry> &layer
|
|||||||
if (sqlite3_prepare_v2(db, "SELECT value from metadata where name = 'maxzoom'", -1, &r->stmt, NULL) == SQLITE_OK) {
|
if (sqlite3_prepare_v2(db, "SELECT value from metadata where name = 'maxzoom'", -1, &r->stmt, NULL) == SQLITE_OK) {
|
||||||
if (sqlite3_step(r->stmt) == SQLITE_ROW) {
|
if (sqlite3_step(r->stmt) == SQLITE_ROW) {
|
||||||
int maxz = min(sqlite3_column_int(r->stmt, 0), maxzoom);
|
int maxz = min(sqlite3_column_int(r->stmt, 0), maxzoom);
|
||||||
|
|
||||||
|
if (st->maxzoom >= 0 && maxz != st->maxzoom) {
|
||||||
|
fprintf(stderr, "Warning: mismatched maxzooms: %d in %s vs previous %d\n", maxz, r->name.c_str(), st->maxzoom);
|
||||||
|
}
|
||||||
|
|
||||||
st->maxzoom = max(st->maxzoom, maxz);
|
st->maxzoom = max(st->maxzoom, maxz);
|
||||||
}
|
}
|
||||||
sqlite3_finalize(r->stmt);
|
sqlite3_finalize(r->stmt);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "v1.32.1"
|
#define VERSION "v1.32.2"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user