More work on plumbing attribute accumulation through (#263)

* Plumb bounding boxes through potential intersections

* Quick bbox reject for bins that can't possibly intersect

* Inching toward attribute accumulation in megatile handling

* Some sort of test for how all these things interact with each other.

Automatic numeric attribute accumulation does *not* apply to attributes
that have an explicit attribute accumulator set, because the order of
operations is too messy and weird

* More sketching

* More sketching

* Actually do some accumulation

* Put all that behind an --accumulate-numeric flag

* Use the same attribute accumulation logic in binning as in megatiles

* Fix backwards conditional

* Add means, but somehow I have some counts of 0

* Handle aggregated attributes with no base attribute in the feature

* Checkpoint before I break everything

* Found a flaw, now to debug

* Fix a typo that broke accumulation

* Add binning tests

* Make sure IDs make it through on the bins

* Fix count/mean accumulation

* Make the numeric accumulation prefix configurable

* Make sure the accumulate test still works with a different prefix

* Forgot to update this test

* More testing to make sure cluster sizes make it all the way through

* Fix neglected --accumulate-attribute when binning

* Mark unexercised attribute accumulation cases as "can't happen"

* Factor out numeric preservation

* Attrs with the accumulation prefix are just preserved, not accumulated

* Test behavior of prefixed attributes

* Plumbing for exclude and exclude-prefix

* Implement and test attribute prefix stripping in overzoom

* Update version and changelog

* For debugging, make an attribute list of source feature IDs

* Revert "For debugging, make an attribute list of source feature IDs"

This reverts commit 65fc99c9d1.
This commit is contained in:
Erica Fischer
2024-09-20 15:30:29 -07:00
committed by GitHub
parent 534242887d
commit c5f2f0da34
23 changed files with 2386 additions and 3919 deletions
+14
View File
@@ -341,3 +341,17 @@ std::string truncate_string(std::string const &s, size_t len) {
return s.substr(0, i);
}
bool starts_with(std::string const &s, std::string const &prefix) {
if (s.size() < prefix.size()) {
return false;
}
for (size_t i = 0; i < prefix.size(); i++) {
if (s[i] != prefix[i]) {
return false;
}
}
return true;
}