mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Improve quality of coalescing-as-needed; add options to limit feature count (#25)
* Add an option to limit geometry vertex count * Update docs and changelog * Track desired feature count and geometry size in strategies * Remove dead code for a long-forgotten inaccessible option * Fix the option name in changelog * Refine coalesce-smallest to only coalesce onto other small features * Clean polygons before coalescing-as-needed * Don't accumulate tiny polygon holes as negative dust * Add the option not to limit the feature count at maxzoom * Add options to limit feature count more abruptly in each tile * Revert "Add the option not to limit the feature count at maxzoom" This reverts commitace173ab7a. * Revert "Fix the option name in changelog" This reverts commit38dbce8405. * Revert "Add an option to limit geometry vertex count" This reverts commitd379fdf06b. * Remove test for reverted option * Remove more leftovers from geometry size limiting * Update changelog
This commit is contained in:
@@ -83,6 +83,8 @@ int cluster_distance = 0;
|
||||
int tiny_polygon_size = 2;
|
||||
long justx = -1, justy = -1;
|
||||
std::string attribute_for_id = "";
|
||||
size_t limit_tile_feature_count = 0;
|
||||
size_t limit_tile_feature_count_at_maxzoom = 0;
|
||||
unsigned int drop_denser = 0;
|
||||
|
||||
std::vector<order_field> order_by;
|
||||
@@ -2851,6 +2853,8 @@ int main(int argc, char **argv) {
|
||||
{"Setting or disabling tile size limits", 0, 0, 0},
|
||||
{"maximum-tile-bytes", required_argument, 0, 'M'},
|
||||
{"maximum-tile-features", required_argument, 0, 'O'},
|
||||
{"limit-tile-feature-count", required_argument, 0, '~'},
|
||||
{"limit-tile-feature-count-at-maximum-zoom", required_argument, 0, '~'},
|
||||
{"no-feature-limit", no_argument, &prevent[P_FEATURE_LIMIT], 1},
|
||||
{"no-tile-size-limit", no_argument, &prevent[P_KILOBYTE_LIMIT], 1},
|
||||
{"no-tile-compression", no_argument, &prevent[P_TILE_COMPRESSION], 1},
|
||||
@@ -2981,6 +2985,10 @@ int main(int argc, char **argv) {
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
break;
|
||||
} else if (strcmp(opt, "limit-tile-feature-count") == 0) {
|
||||
limit_tile_feature_count = atoll_require(optarg, "Limit tile feature count");
|
||||
} else if (strcmp(opt, "limit-tile-feature-count-at-maximum-zoom") == 0) {
|
||||
limit_tile_feature_count_at_maxzoom = atoll_require(optarg, "Limit tile feature count at maxzoom");
|
||||
} else if (strcmp(opt, "drop-denser") == 0) {
|
||||
drop_denser = atoi_require(optarg, "Drop denser rate");
|
||||
if (drop_denser > 100) {
|
||||
|
||||
Reference in New Issue
Block a user