mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Drop or retain whole multiplier clusters when dropping as needed (#198)
* Prep to track conditions other than just "dropped" or "kept" * Count up instead of down * Drop or retain whole multiplier clusters based on their first feature * Calculate a global feature dropping sequence * Switch over to using the drop sequence for drop-fraction * Remove unused arguments for the old drop-fraction implementation * Fix copy-and-paste bugs, update tests * Properly incorporate feature_minzoom into the drop sequence, I hope * Rename drop_by to drop_sequence * See if sorting within clusters fixes filter stability between zooms * Remove very chatty debug print * Update changelog and version * Use named constants instead of numbers for feature dropping/keeping * Add comment to explain purpose and method of bit reversal
This commit is contained in:
+14
-1
@@ -709,7 +709,20 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
}
|
||||
}
|
||||
|
||||
if (additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_CLUSTER_DENSEST_AS_NEEDED] || additional[A_CALCULATE_FEATURE_DENSITY] || additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED] || additional[A_INCREASE_GAMMA_AS_NEEDED] || additional[A_GENERATE_POLYGON_LABEL_POINTS] || sst->uses_gamma || cluster_distance != 0) {
|
||||
if (additional[A_DROP_DENSEST_AS_NEEDED] ||
|
||||
additional[A_COALESCE_DENSEST_AS_NEEDED] ||
|
||||
additional[A_CLUSTER_DENSEST_AS_NEEDED] ||
|
||||
additional[A_CALCULATE_FEATURE_DENSITY] ||
|
||||
additional[A_DROP_SMALLEST_AS_NEEDED] ||
|
||||
additional[A_COALESCE_SMALLEST_AS_NEEDED] ||
|
||||
additional[A_DROP_FRACTION_AS_NEEDED] ||
|
||||
additional[A_COALESCE_FRACTION_AS_NEEDED] ||
|
||||
prevent[P_DYNAMIC_DROP] ||
|
||||
additional[A_INCREASE_GAMMA_AS_NEEDED] ||
|
||||
additional[A_GENERATE_POLYGON_LABEL_POINTS] ||
|
||||
sst->uses_gamma ||
|
||||
retain_points_multiplier > 1 ||
|
||||
cluster_distance != 0) {
|
||||
sf.index = bbox_index;
|
||||
} else {
|
||||
sf.index = 0;
|
||||
|
||||
Reference in New Issue
Block a user