Skip to content

R CMD check with R_SF_ST_READ_USE_STREAM=true  #2296

Open
@rsbivand

Description

@rsbivand

Running CMD check for GDAL 3.8.2RC1, I set R_SF_ST_READ_USE_STREAM=true, and hit a problem in tests/empty.R, lines 91-92:
00check.log

> y = st_read("empty.gpkg", quiet = TRUE)
> all.equal(x, y)
Error in UseMethod("st_geometry") : 
  no applicable method for 'st_geometry' applied to an object of class "c('double', 'numeric')"
> str(x)
Classes 'sf' and 'data.frame':	2 obs. of  2 variables:
 $ a   : int  2 1
 $ geom:sfc_LINESTRING of length 2; first list element:  'XY' num[0 , 1:2] LINESTRING EMPTY
 - attr(*, "sf_column")= chr "geom"
 - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA
  ..- attr(*, "names")= chr "a"
> str(y)
Classes 'sf' and 'data.frame':	2 obs. of  2 variables:
 $ a   : int  2 1
 $ geom:sfc_MULTILINESTRING of length 2; first list element:  list()
  ..- attr(*, "class")= chr [1:3] "XY" "MULTILINESTRING" "sfg"
 - attr(*, "sf_column")= chr "geom"
 - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA
  ..- attr(*, "names")= chr "a"

I guess this is not new for GDAL 3.8.2, will check when this train gets to Bergen.

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