Skip to content

Commit

Permalink
Impose a limit on the maximum number of features in a tile.
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Dec 19, 2014
1 parent 290e39f commit b2eff13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,12 @@ long long write_tile(char **geoms, char *metabase, unsigned *file_bbox, int z, u
}

if (features.size() > 0) {
if (features.size() > 200000) {
fprintf(stderr, "tile %d/%u/%u has %lld features, >200000 \n", z, tx, ty, (long long) features.size());
fprintf(stderr, "Try using -z to set a higher base zoom level.\n");
exit(EXIT_FAILURE);
}

mapnik::vector::tile tile = create_tile(layername, line_detail, features, &count, &keys, &values);

pool_free(&keys);
Expand Down

0 comments on commit b2eff13

Please sign in to comment.