fix: terra compat — replace raster::projectRaster in Fun.Soil_Geol#11
Merged
Conversation
raster::projectRaster crashes with terra 1.8.x due to CRS slot incompatibility (.rawTransform expects old-style CRS). Also fixes projection direction: original code projected PCS→PCS (same CRS, no-op), but the GCS output file needs PCS→EPSG:4326. Tested: SHUD server env, AutoSHUD Step1-3 baseline pass.
Owner
Author
Review单文件修复,改动明确:
SHUD 服务器环境验证 Step1-3 baseline 全部通过,sp.riv MD5 可复现。 |
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.
问题
Fun.Soil_Geol.R:62使用raster::projectRaster(r1, crs=xfg$crs.pcs),在 terra 1.8.x 环境下因 CRS slot 不兼容崩溃:此外原代码投影方向有误:将 PCS 栅格投影到 PCS(同 CRS),但写入的是 GCS 路径 (
fg)。修复
terra::project(r1t, "EPSG:4326")验证(SHUD 服务器环境)
qhh.sp.rivMD5 可复现 (78763f08)