Skip to content

Use stable user interface in terra #16

Closed
@auenoekologie

Description

@auenoekologie

The unstable user interface to terras SpatExtent class changed causing the following error in CRAN checks:

Running examples in ‘hydflood-Ex.R’ failed
The error most likely occurred in:

> ### Name: classifyToPNV
> ### Title: Function to reclassify flood durations to potential natural
> ###   vegetation
> ### Aliases: classifyToPNV
> 
> ### ** Examples
> 
> ## No test: 
>   cache <- tempdir()
>   options("hyd1d.datadir" = cache)
>   options("hydflood.datadir" = cache)
>   options(timeout = 200)
>   library(hydflood)
>   
>   # import the raster data and create a raster stack
>   c <- st_crs("EPSG:25833")
>   e <- ext(309000, 310000, 5749000, 5750000)
>   x <- hydSpatRaster(ext = e, crs = c)
Error in getDEM(filename = tempfile(fileext = ".tif"), ext = ext_int,  : 
  no slot of name "ptr" for this object of class "SpatExtent"
Calls: hydSpatRaster -> getDEM
Execution halted```


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