State compliance with SP3.0 and SP3.1#294
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the package documentation to state compliance with spatial statistics standards SP3.0 and SP3.1. The changes clarify that the package does use spatial neighbors through the get_cost_distance() function, which leverages terra::costDist() for cost distance calculations with slope-weighted neighbor contributions.
- Updates documentation tags from "not applicable" to "compliant" for SP3.0 and SP3.1 standards
- Adds detailed explanation of how spatial neighbors are handled via
terra::costDist() - Maintains "not applicable" status for SP3.0b (irregular spaces) while providing clearer rationale
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| R/valley.R | Adds SP3.1 compliance documentation to get_cost_distance() function |
| R/srr-stats-standards.R | Updates SP3.0/SP3.1 status from NA to compliant with detailed explanations |
Comments suppressed due to low confidence (1)
R/srr-stats-standards.R:115
- The function name in the comment
get_cost_dist()does not match the actual function nameget_cost_distance()used in the code.
#' @srrstatsNA {SP3.0, SP3.0a} The `get_cost_dist()` internal function uses
fnattino
requested changes
Jul 23, 2025
Contributor
fnattino
left a comment
There was a problem hiding this comment.
I think for this one we should refer to smooth_dem(), where we apply a spatial median filter using a square ("queen") neighborhood form.
fnattino
approved these changes
Jul 25, 2025
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.
No description provided.