Skip to content

GDAL 3.3.2 example failure #174

Description

@rsbivand

00check.log

From revdeps with PROJ 8.1.1 and GDAL 3.3.2, the package fails in the outputs examples:

>       newRas <- raster(dir(tmpdir, full.name = TRUE, pattern = ".tif"))
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer",  : 
  Cannot create a RasterLayer object from this file.
In addition: There were 14 warnings (use warnings() to see them)
> dir(tmpdir, full.name = TRUE, pattern = ".tif")
[1] "/tmp/RtmpvjXEpt/outputs/test_year10.tif"        
[2] "/tmp/RtmpvjXEpt/outputs/test_year10.tif.aux.xml"
> newRas <- raster(dir(tmpdir, full.name = TRUE, pattern = ".tif")[1])
>       all.equal(newRas, ras) # Should be TRUE

So dir(tmpdir, full.name = TRUE, pattern = ".tif") now returns two file names, which raster() cannot disambiguate. I think the code has always been fragile, so choosing the first element disambiguates.

Activity

  1. added a commit that references this issue on Sep 2, 2021
    969d549
  2. achubaty commented on Sep 2, 2021

    @achubaty
    Contributor

    @rsbivand thank you for identifying this, I have made the change you suggested. I'll try testing with latest GDAL when I get a moment. Is there a docker container or similar you are using for testing?

  3. rsbivand commented on Sep 2, 2021

    @rsbivand
    Author

    I don't use docker, should sometime, but am concentrating on release candidates installed from source. PROJ 8.1.1 is just released https://download.osgeo.org/proj/proj-8.1.1.tar.gz, GDAL 3.3.2RC3 https://download.osgeo.org/gdal/3.3.2rc3/gdal-3.3.2rc3.tar.gz, but the problem may have existed before in the PROJ 8.1 and GDAL 3.3 branches; looking at my logs it was there for PROJ 8.1.0 with GDAL 3.3.1 RCs, but I didn't follow up then, as looking for s2 problems, which this wasn't.

  4. achubaty commented on Sep 2, 2021

    @achubaty
    Contributor

    currently passing macOS 11.5.2, R 4.1.1, with GDAL 3.3.1 and PROJ 8.1.1.

    will test again once brew updates the GDAL formula to use 3.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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