[R-pkg-team] Bug#939002: Problem in test suite of sf since upgrade of proj

Edzer Pebesma edzer.pebesma at uni-muenster.de
Wed Sep 4 21:48:09 BST 2019


Thanks for reporting.

I see warnings of this kind:

< Warning message:
< In CPL_crs_from_proj4string(x) :
<   GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might
return a CRS with a non-EPSG compliant axis order.

but not the errors you get with +init=epsg:xxxx ; this is with PROJ
6.1.1RC1, and now with PROJ 6.2.0. I have no idea why.


On 9/4/19 3:58 PM, Andreas Tille wrote:
> Control: tags -1 upstream
> Control: forwarded -1 Edzer Pebesma <edzer.pebesma at uni-muenster.de>
> 
> Hi Edzer,
> 
> since the upgrade to proj (6.1.1-1) the autopkgtest for sf fails:
> 
> $ LC_ALL=C.UTF-8 R --no-save < testthat.R 
> 
> R version 3.6.1 (2019-07-05) -- "Action of the Toes"
> Copyright (C) 2019 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
> 
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
>> library(testthat)
>> suppressPackageStartupMessages(library(sf))
>>
>> test_check("sf")
> proj_create: Error -5: unknown projection id
> proj_create: Error -9: unknown elliptical parameter name
> proj_create: init=epsg:/init=IGNF: syntax not supported in non-PROJ4 emulation mode
> proj_create: init=epsg:/init=IGNF: syntax not supported in non-PROJ4 emulation mode
> proj_create: init=epsg:/init=IGNF: syntax not supported in non-PROJ4 emulation mode
> ── 1. Error: $.crs works (@test_crs.R#49)  ─────────────────────────────────────
> missing value where TRUE/FALSE needed
> 1: expect_true(is.numeric(st_crs("+init=epsg:3857 +units=m")$b)) at testthat/test_crs.R:49
> 2: quasi_label(enquo(object), label, arg = "object")
> 3: eval_bare(get_expr(quo), get_env(quo))
> 4: st_crs("+init=epsg:3857 +units=m")
> 5: st_crs.character("+init=epsg:3857 +units=m")
> 6: make_crs(x)
> 
> proj_create: init=epsg:/init=IGNF: syntax not supported in non-PROJ4 emulation mode
> ── 2. Error: $.crs works 2 (@test_crs.R#55)  ───────────────────────────────────
> missing value where TRUE/FALSE needed
> 1: expect_true(is.numeric(st_crs("+init=epsg:3857 +units=km")$b)) at testthat/test_crs.R:55
> 2: quasi_label(enquo(object), label, arg = "object")
> 3: eval_bare(get_expr(quo), get_env(quo))
> 4: st_crs("+init=epsg:3857 +units=km")
> 5: st_crs.character("+init=epsg:3857 +units=km")
> 6: make_crs(x)
> 
> Cannot open layer foo
> Reading layer `nospatial' from data source `/usr/lib/R/site-library/sf/gpkg/nospatial.gpkg' using driver `GP
> Reading layer `nospatial' from data source `/usr/lib/R/site-library/sf/gpkg/nospatial.gpkg' using driver `GP
> OGR: Unsupported geometry type
> Reading layer `nc' from data source `/usr/lib/R/site-library/sf/shape/nc.shp' using driver `ESRI Shapefile'
> Simple feature collection with 100 features and 14 fields
> geometry type:  MULTIPOLYGON
> dimension:      XY
> bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
> epsg (SRID):    4267
> proj4string:    +proj=longlat +datum=NAD27 +no_defs
> driver `foo' not available.
> Dataset /tmp/RtmpTlApgW/file1ffa3ef15a25.gpkg already exists: remove first, use update=TRUE to append,
> delete_layer=TRUE to delete layer, or delete_dsn=TRUE to remove the entire data source before writing.
> Creating layer . failed.
> Failed to create feature 1 in x
> Failed to create feature 1 in x
> Failed to create feature 1 in x
> ══ testthat results  ═══════════════════════════════════════════════════════════
> [ OK: 658 | SKIPPED: 59 | WARNINGS: 6 | FAILED: 2 ]
> 1. Error: $.crs works (@test_crs.R#49) 
> 2. Error: $.crs works 2 (@test_crs.R#55) 
> 
> Error: testthat unit tests failed
> Execution halted
> 
> 
> Could you try to port sf to the recent version of proj?
> 
> Kind regards
> 
>       Andreas.
> 
> 

-- 
Edzer Pebesma
Institute for Geoinformatics
Heisenbergstrasse 2, 48151 Muenster, Germany
Phone: +49 251 8333081
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 3110 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/r-pkg-team/attachments/20190904/7031eb4a/attachment.key>


More information about the R-pkg-team mailing list