You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slope, aspect and hillshade filled missing neighbours and computed boundary cells without explaining that policy. Raster Functions and function chains now report affected valid output cells and document the existing behavior: outside-grid samples use the nearest edge cell, invalid sampled neighbours use the centre elevation, and a missing centre remains NoData.
Counting shares the terrain traversal and keeps the optimized valid interior path. Existing terrain formulas, default output and command parameters remain unchanged. Held and tiled functions use the same reported calculation; notices land after the result, including background runs and held hillshade.
For a single function or the last terrain step in a tiled chain, counts exclude disposable block margins. Intermediate chained steps also evaluate margins needed downstream; their notices explicitly give upper bounds that can include repeated intermediate margin evaluations. The two treatment counts can overlap for one output cell.
The shared analysis and engine paths reach desktop, browser, CLI, Python and phone Raster Functions and the Function Editor. The change adds counters and stage metadata, with no extra full-raster pass or raster-sized storage. It keeps the existing undo and cancellation paths.
Testing
The actual command regression failed on the baseline because no edge-treatment notice was emitted.
A five-by-five grid with a NoData centre requires 16 clamped-boundary outputs and 8 centre-filled outputs for each terrain function.
Additional regressions cover kept-core counts, a clean interior, thread parity, and whole-versus-block pixel/notice parity with a missing cell at four block corners. Chained intermediate counts must identify their upper-bound basis.
Independent review approved the complete change with no blocking findings. The targeted engine terrain group (21 tests) and analysis terrain group (5 tests) passed. The source-layout contract and five analysis terrain tests passed after placing the test adapter inside the existing test module. The full Linux fork gate passed on 32a65633496a6f7f54c269c79f40f93f8a4430df, including the broad engine, Python and Assistant checks.
Slope, aspect, and hillshade results now include notices counting valid output cells that used edge or missing-neighbour elevation handling. A cell may be included in both counts.
For block-based processing, counts reflect retained output cells. Terrain steps in chained workflows may report an upper-bound count.
Documentation
Clarified how terrain analysis handles missing centre cells, raster edges, and invalid neighbours.
No actionable comments were generated in the recent review.
Walkthrough
Terrain operations now report counts for outputs that use clamped or filled neighbours. Raster workflows aggregate these counts across blocks and terrain chains, then include them in notices. Block callbacks also receive the retained core rectangle used to scope counts.
Terrain traversal counts finite outputs that use clamped or filled neighbours, with optional core-rectangle filtering. terrain_reported selects a terrain function and returns pixels, edge counts, and percent-slope overflow counts. Existing terrain entrypoints retain their pixel-only results.
Block windows and terrain notices crates/engine/src/cmd/in_blocks.rs, crates/engine/src/cmd/workflows.rs
Block callbacks receive the retained core rectangle. Raster workflows pass windows to terrain reporting, aggregate counts by stage, and add terrain notices. Chained terrain steps retain extra halo cells needed by later terrain steps.
Terrain reporting validation and documentation crates/engine/src/tests/tiled_files.rs, docs/user-guide/analysis.md
Tests compare whole-raster and blockwise outputs and check boundary counts and notices. The guide documents neighbour handling and the scope of counts.
sequenceDiagram
participant Blocks
participant Source
participant RasterWorkflow
participant terrain_reported
participant Remaps
Blocks->>Source: run_window supplies block and offset
Source->>RasterWorkflow: raster, bounds, and core rectangle
RasterWorkflow->>terrain_reported: terrain function and core window
terrain_reported-->>RasterWorkflow: pixels and edge counts
RasterWorkflow->>Remaps: aggregate counts by stage
Remaps-->>RasterWorkflow: terrain notices
Loading
Possibly related PRs
opengeos/RustGIS#1130: Adds the row-window interior path and edge handling used by the terrain traversal that now counts edge treatments.
opengeos/RustGIS#2896: Adds blockwise terrain execution and chain halo behavior used by the new core-window count handling.
Suggested reviewers:pick2510, giswqs
Merge Risk: Low · up to 32a65
This change reports how many slope, aspect and hillshade outputs used edge clamping or centre-filled neighbours, without altering the terrain formulas. No defect was found in the reviewed code. The browser (wasm32) build check failed for a reason that could not be determined, so confirm whether that failure comes from this change or from the base before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: terrain edge treatment counts are now reported for slope, aspect, and hillshade in the analysis crate. The title uses the conventional type(scope) prefix and is concis…
Description check
The description follows the template's Summary, Testing, and Related issue sections. The Summary explains what changed and why. Testing lists the regression, the new tests, and the full gate run. The …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: terrain edge treatment counts are now reported for slope, aspect, and hillshade in the analysis crate. The title uses the conventional type(scope) prefix and is concise. It does not cover the chained-step upper-bound wording or the engine-side notice plumbing, which is expected for a short title.
Full details: Description check
Explanation
The description follows the template's Summary, Testing, and Related issue sections. The Summary explains what changed and why. Testing lists the regression, the new tests, and the full gate run. The UI evidence section is missing. The PR does not show a visible UI change, but the template asks the author to keep the 'No visible UI change.' line, and the description omits it. The description also cites many environments and mentions 'phone' and 'Function Editor' surfaces. Those are claims about reach, not visible UI evidence. The Related issue entry 'Part of #1998' is present, while the objectives reference PR #3210.
Resolution
Add the template's UI evidence line, 'No visible UI change.', under a UI evidence heading. Confirm that no UI-visible change exists, since the description mentions the Function Editor and notices. Optionally reconcile the issue reference, since the objectives cite PR #3210 and the description cites issue #1998.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit hops where raster edges meet, It counts the clamped cells beneath its feet. If neighbours are missing, the centre steps in, Then notices gather each treatment within. Across blocks and chains, the counts all appear.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 51d15220-6057-4965-ad7f-0aa3dc6c5f96
Commits
Reviewing files that changed from the base of the PR and between e041087 and 32a6563.
Files selected for processing: 5
crates/analysis/src/rasterops.rs
crates/engine/src/cmd/in_blocks.rs
crates/engine/src/cmd/workflows.rs
crates/engine/src/tests/tiled_files.rs
docs/user-guide/analysis.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the preview label (once per commit).
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
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.
Summary
Slope, aspect and hillshade filled missing neighbours and computed boundary cells without explaining that policy. Raster Functions and function chains now report affected valid output cells and document the existing behavior: outside-grid samples use the nearest edge cell, invalid sampled neighbours use the centre elevation, and a missing centre remains NoData.
Counting shares the terrain traversal and keeps the optimized valid interior path. Existing terrain formulas, default output and command parameters remain unchanged. Held and tiled functions use the same reported calculation; notices land after the result, including background runs and held hillshade.
For a single function or the last terrain step in a tiled chain, counts exclude disposable block margins. Intermediate chained steps also evaluate margins needed downstream; their notices explicitly give upper bounds that can include repeated intermediate margin evaluations. The two treatment counts can overlap for one output cell.
The shared analysis and engine paths reach desktop, browser, CLI, Python and phone Raster Functions and the Function Editor. The change adds counters and stage metadata, with no extra full-raster pass or raster-sized storage. It keeps the existing undo and cancellation paths.
Testing
32a65633496a6f7f54c269c79f40f93f8a4430df, including the broad engine, Python and Assistant checks.Related issue
Part of #1998.
Summary by CodeRabbit