Skip to content

terra/raster conflict causing crash on transfer module #455

@ThomWorm

Description

@ThomWorm

Hello,
I'm trying out Wallace - looks great!
I've built a simple bioclim model that I'd like to transfer to a new extent - because I'm interested in species invasion.
Everything seems to work fine (I get a reasonable-looking prediction) until I use the Transfer module, which causes a crash.

The error is pasted below - it looks like Wallace is storing the environmental rasters as terra s4 objects and then tries to appy raster::cellStats()
This crash occurs with the "transfer to a new extent" and "transfer to new environments" options.
Maybe something in this module wasn't fully ported over to terra?

Warning: [crs] expected a character string, not a CRS object Warning: Error in : unable to find an inherited method for function ‘cellStats’ for signature ‘x = "SpatRaster"’ 86: stop 85: <Anonymous> 84: raster::cellStats 82: observe [/home/tworm/.cache/R/renv/cache/v5/linux-rhel-9.6/R-4.5/x86_64-redhat-linux-gnu/wallace/2.2.0/433d3f81a66d3897ead3a8b4f2235109/wallace/shiny/modules/xfer_user.R#335] 81: <observer:observeEvent(input$goTransferUser)> 2: shiny::runApp 1: run_wallace [/tmp/RtmpeoYDGT/renv-package-new-7cbc44362799/wallace/R/run_wallace.R#48] Warning: Error in if: argument is of length zero 52: xfer_user_module_map [/home/tworm/.cache/R/renv/cache/v5/linux-rhel-9.6/R-4.5/x86_64-redhat-linux-gnu/wallace/2.2.0/433d3f81a66d3897ead3a8b4f2235109/wallace/shiny/modules/xfer_user.R#421] 50: observe [/home/tworm/.cache/R/renv/cache/v5/linux-rhel-9.6/R-4.5/x86_64-redhat-linux-gnu/wallace/2.2.0/433d3f81a66d3897ead3a8b4f2235109/wallace/shiny/server.R#169] 49: <observer> 2: shiny::runApp 1: run_wallace [/tmp/RtmpeoYDGT/renv-package-new-7cbc44362799/wallace/R/run_wallace.R#48]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions