SDK: configurable CHM aggregation + spike filter - #204
Merged
Conversation
Add aggregation (max/mean/median/percentile with a percentile value) and spike_filter (bool, mapping, or ChmSpikeFilter) parameters to create_canopy_height_grid_from_point_cloud, translating them onto the generated union models via _build_chm_aggregation and _build_chm_spike_filter. Omitting them preserves existing behavior by sending UNSET. Extend the point-cloud grid tests with request-building coverage for a percentile aggregation and the spike filter, helper unit tests for both translators, and a live test that builds a CHM with a non-default aggregation and spike filter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes the CHM aggregation statistic and the spike filter (added API-side in #516/#517/#518) on
create_canopy_height_grid_from_point_cloud.Changes
aggregation—"max","mean","median", or"percentile"; thepercentileargument (0-100) carries the rank for the percentile method. Translated onto the generatedChm{Max,Mean,Median,Percentile}Aggregationunion via_build_chm_aggregation.spike_filter—Noneapplies the API default filter,Falsedisables it (keeps every return),Trueapplies a defaultChmSpikeFilter, and a mapping /ChmSpikeFiltersets custom thresholds. Translated via_build_chm_spike_filter.UNSET).Tests
_build_chm_aggregationand_build_chm_spike_filter(valid, edge, and error paths).aggregation="percentile",percentile=95, and a custom spike filter over a Bondurant, WY domain with stable 3DEP coverage.Offline unit tests pass;
blackandflake8clean. The live test was run against the API and passes.Depends on #195 (merged into main).
Closes #201