Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Superseded by the combined release-quality PR #2196 so these related fixes can be reviewed together. |
| return true; | ||
| } | ||
| let masked = self.masked_stats(); | ||
| let stats = masked.as_ref().and_then(|m| m.first()).or_else(|| self.data.as_ref()?.bands.get(*band).map(|b| &b.stats)); |
There was a problem hiding this comment.
Quality (maintainability), not a bug: the "masked statistics first, else the band's own" selection is now written three times (classes_unknown around line 2162, the stats closure in legend_classes around line 2250, and here). lists_every_class has to pick the same statistics as legend_classes, or the rare-class warning can disagree with the legend it describes. A small shared helper would keep them in step, e.g. fn legend_stats(&self, band: usize) -> Option<Arc<Vec<BandStats>>> or a method returning Option<&BandStats> for the masked-or-band choice, used by all three sites.
Code reviewReviewed the 3-file diff ( Bugs
Security
Performance
Quality
AGENTS.md
I checked nothing else, and I did not run the test suite. Change sizeCompared: the whole PR against main (merge base ce40749 to PR head ca01083).
|
Summary
Unique Values now avoids a misleading rare-class warning when a legend lists every configured value because its statistics cannot enumerate the raster's values. The new regression covers both the all-values case and the sampled-subset case where the warning still applies.
MGRS measured grids also accept the
epsg 32632spelling already supported by projection lookup. QGIS bookmark imports retain their existing group order while using set membership instead of repeatedly scanning prior groups.Deferred review points: legend warning, MGRS alias, bookmark groups.
Testing
cargo fmt --all --checkandgit diff --check.UI evidence
Before/after captures have been rendered and are being attached. They show a classified raster reloaded from a source with too many values for an enumerated statistics list: the legend still lists every configured value, and the false rare-class warning disappears.