Skip to content

Commit

Permalink
It only needs to look for other small features when coalescing, not d…
Browse files Browse the repository at this point in the history
…ropping (#64)

* Back out the slow search for other small features when dropping features

* Actually, *do* look for small features still when coalescing

* Update changelog
  • Loading branch information
e-n-f authored Jan 27, 2023
1 parent e615668 commit b155b46
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 215 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.22.0

* Speed up feature dropping by removing unnecessary search for other small features

## 2.21.0

* Improve label placement to avoid placing labels in polygon holes
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,9 @@ long long write_tile(FILE *geoms, std::atomic<long long> *geompos_in, char *meta
}
} else if (additional[A_DROP_SMALLEST_AS_NEEDED]) {
add_sample_to(extents, sf.extent, extents_increment, seq);
if (sf.extent + coalesced_area <= minextent && find_partial(partials, sf, which_partial, layer_unmaps, minextent)) {
// search here is for LLONG_MAX, not minextent, because we are dropping features, not coalescing them,
// so we shouldn't expect to find anything small that we can related this feature to.
if (sf.extent + coalesced_area <= minextent && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
strategy->dropped_as_needed++;
continue;
Expand Down
2 changes: 1 addition & 1 deletion version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP

#define VERSION "v2.21.0"
#define VERSION "v2.22.0"

#endif

0 comments on commit b155b46

Please sign in to comment.