Repository navigation
fix(render): Proportional Symbols scale a point layer's stacked marks, on the map and in the legend (#3400) - #3669
choupeanut wants to merge 2 commits into
Conversation
…, on the map and in the legend (opengeos#3400) Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewTwo inline comments are buffered on the diff. Both are Bugs
Security
Performance
Quality
AGENTS.md
Earlier review threads
Change sizeCompared with the base branch (merge base
|
📖 Docs previewCommit |
Summary
A point layer with stacked marks drawn with Proportional Symbols drew every feature's marks at the stack's own sizes, and its legend listed the same marks for the smallest, middle and largest value (#3400). Only a Size expression or a size mapping scaled the marks.
Styler::marks(rustgis-map,symbol_by.rs) now takes a Proportional Symbols renderer's size for the feature as the size the marks scale to, as it does for a Size expression (a Size expression still wins). A non-finite size leaves the marks as they are; a size of 0 draws nothing (the symbol is hidden too, so no 1 px dot is left).Layer::with_size_legendgives the Proportional size rows the layer's marks at each size, so layout legends (rows and nested), the Layers pane legend and counted legends draw them.docs/user-guide/cartography.mdsays so under Proportional Symbols.Nothing is dropped or approximated, so no notice or
LossCodeis added; no command, parameter or saved format changes, and no interface text. The map view, layout map frames and exports all draw throughStyler::marks, so they share the fix; the desktop app, browser, command line, Python and phone use the samemapandrendercrates. The Assistant, MCP and plugins read no new option. Left as it was: with a Size expression on a Proportional layer, the legend still shows the proportional sizes (as it did for the plain symbol).Testing
rustgis-maptestsymbol_by::tests::proportional_symbols_scale_a_points_marks_with_each_features_size(marks per row, null value, Size expression winning, legend rows, graphics layer, no marks, base size 0, NaN/infinite sizes, size 0). It failed before the change (left: [(10.0, 0.0, 1.0), (2.0, 3.0, 1.0)],right: [(40.0, 0.0, 4.0), (8.0, 12.0, 4.0)]) and passes now.rustgis-rendertesttests::proportional_symbols_draw_a_point_layers_marks_at_each_features_size(rendered marks about 5 and 40 pixels across for the smallest and largest value). Passes; not run against the old code.cargo test -p rustgis-map(748 passed),cargo test -p rustgis-render proportional_symbols_draw,cargo clippy -p rustgis-map --all-targets -- -D warnings,cargo clippy -p rustgis-render --all-targets -- -D warnings,cargo fmt --all.cargo xtask ciand the rest of the render and engine tests are left to PR CI.UI evidence
No screenshots attached yet.
Related issue
Closes #3400
Summary by CodeRabbit