hypertidy/PROJ

lib-PROJ 7 on CRAN problem

Closed this issue · 2 comments

https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/PROJ-00check.html

> Please correct before 2020-04-09 to safely retain your package on CRAN.

Michael: the Debian systems now have proj7 ...

fragment of check

checking tests ... [3s/5s] ERROR
  Running ‘spelling.R’ [0s/1s]
  Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(PROJ)
  >
  > test_check("PROJ")
  proj_create_operations: source_crs is not a CRS
  ── 1. Error: PROJ works (@test-PROJ.R#11) ─────────────────────────────────────
  generic error of unknown origin
  Backtrace:
   1. testthat::expect_silent(...)
   9. PROJ::proj_trans_generic(...)
  
  proj_create: unrecognized format / unknown name
  proj_create: unrecognized format / unknown name
  ══ testthat results ═══════════════════════════════════════════════════════════
  [ OK: 17 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
  1. Error: PROJ works (@test-PROJ.R#11)
  
  Error: testthat unit tests failed
  Execution halted

The failing test is this:

PROJ::proj_trans_generic(cbind(0, 0), "+proj=laea +datum=WGS84 +lon_0=147 +lat_0=-42", source = "EPSG:4326")
$x_
[1] -8013029

$y_
[1] -8225762

$z_
[1] 0

$t_
numeric(0)

works on ubuntu with proj7

I wonder if this would work on CRAN:

PROJ::proj_trans_generic(cbind(0, 0), "+proj=laea +datum=WGS84 +lon_0=147 +lat_0=-42", source = "+init=epsg:4326")
Error in PROJ::proj_trans_generic(cbind(0, 0), "+proj=laea +datum=WGS84 +lon_0=147 +lat_0=-42",  : 
  generic error of unknown origin
proj_create: init=epsg:/init=IGNF: syntax not supported in non-PROJ4 emulation mode

seems fine

image