Skip to content

Commit e54cf27

Browse files
committed
Add a flag to disregard the usual 500K tile size limit
1 parent 246aeb6 commit e54cf27

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ instead of merging existing tilesets. The `bin size` plus the `detail` always eq
9999
### Vector tiles
100100

101101
* `-1`: Output an individual polygon for each bin instead of combining them into MultiPolygons.
102+
* `-k`: Don't enforce the 500K limit on tile size
102103

103104
### Miscellaneous controls
104105

tile.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ int color = 0x888888;
3636
int white = 0;
3737

3838
bool single_polygons = false;
39+
bool limit_tile_sizes = true;
3940

4041
bool quiet = false;
4142
bool include_density = false;
@@ -349,7 +350,7 @@ void make_tile(sqlite3 *outdb, tile &tile, int z, int detail, long long zoom_max
349350
return;
350351
}
351352

352-
if (compressed.size() > 500000) {
353+
if (limit_tile_sizes && compressed.size() > 500000) {
353354
fprintf(stderr, "Tile is too big: %zu\n", compressed.size());
354355
exit(EXIT_FAILURE);
355356
}
@@ -1110,7 +1111,7 @@ int main(int argc, char **argv) {
11101111
std::string layername = "count";
11111112

11121113
int i;
1113-
while ((i = getopt(argc, argv, "fz:Z:s:a:o:p:d:l:m:g:bwc:qn:y:1")) != -1) {
1114+
while ((i = getopt(argc, argv, "fz:Z:s:a:o:p:d:l:m:g:bwc:qn:y:1k")) != -1) {
11141115
switch (i) {
11151116
case 'f':
11161117
force = true;
@@ -1140,6 +1141,10 @@ int main(int argc, char **argv) {
11401141
quiet = true;
11411142
break;
11421143

1144+
case 'k':
1145+
limit_tile_sizes = false;
1146+
break;
1147+
11431148
case 'l':
11441149
levels = atoi(optarg);
11451150
if (levels < 1 || levels > 256) {

0 commit comments

Comments
 (0)