mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 09:25:41 +02:00
Limit maxzoom to the max that actually works
This commit is contained in:
@@ -63,6 +63,8 @@ int mb_geometry[GEOM_TYPES] = {
|
||||
int CPUS;
|
||||
int TEMP_FILES;
|
||||
|
||||
#define MAX_ZOOM 24
|
||||
|
||||
void init_cpus() {
|
||||
CPUS = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (CPUS < 1) {
|
||||
@@ -1543,7 +1545,6 @@ int read_json(int argc, char **argv, char *fname, const char *layername, int max
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#define MAX_ZOOM 30
|
||||
struct tile {
|
||||
unsigned x;
|
||||
unsigned y;
|
||||
@@ -2240,6 +2241,11 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (maxzoom > MAX_ZOOM) {
|
||||
maxzoom = MAX_ZOOM;
|
||||
fprintf(stderr, "Highest supported zoom is %d\n", maxzoom);
|
||||
}
|
||||
|
||||
if (minzoom > maxzoom) {
|
||||
fprintf(stderr, "minimum zoom -Z cannot be greater than maxzoom -z\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user