Skip to content

Declare studyArea as an input - #16

Merged
eliotmcintire merged 2 commits into
developmentfrom
fix/declare-studyArea
Sep 28, 2026
Merged

eliotmcintire merged 2 commits into
developmentfrom
fix/declare-studyArea

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

.inputObjects masks the fire polygons, land cover and stand age it makes to sim$studyArea (maskTo/studyArea at lines 261, 617, 631), but studyArea was never declared with expectsInput(). An undeclared object is not visible in .inputObjects, so it was always NULL and nothing was masked. This declares it.

It also removes the workaround #15 added for the same cause: when studyArea was missing, resolveStudyAreaName() hashed the extent of rasterToMatch instead, so .inputObjects and Init named the same study area differently. Now an unset .studyAreaName is a hash of studyArea, or stays NA without one (the default is under discussion in PredictiveEcology/LandR#246). The function moves below .inputObjects so its roxygen block attaches to .inputObjects again.

Tests: the metadata test and the new "stays NA" test fail on development and pass here; full suite 49 pass, 0 fail. Version 1.0.4.9003.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

eliotmcintire and others added 2 commits September 24, 2026 14:11
.inputObjects masks the fire polygons, land cover and stand age it makes
to sim$studyArea, but an undeclared object is not visible there, so it was
always NULL and nothing was masked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
It stood in for studyArea because studyArea was undeclared and so NULL in
.inputObjects. Now that it is declared, an unset .studyAreaName is a hash
of studyArea, or stays NA without one. resolveStudyAreaName() moves below
.inputObjects so the roxygen block attaches to .inputObjects again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit f569c96 into development Sep 28, 2026
6 checks passed
@eliotmcintire
eliotmcintire deleted the fix/declare-studyArea branch September 28, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant