hypertidy/PROJ

failing in 32-bit windows

Closed this issue · 4 comments

In branch no-onload, the build fails in 32-bit mode as seen on Appveyor.

(The .onLoad test that sets an option is disabled, so the package compiles and installs).

If I start 32-bit R and run this it works, without the Sys.setenv() it fails (it's fine in 64-bit).

Is there something about how the different architectures treat the "working directory"?

Sys.setenv(PROJ_LIB= system.file("proj", package = "PROJ"))
library(PROJ)
proj_trans_generic(cbind(147, -42), "+proj=laea", source = "epsg:4326")

The PROJ FAQ describes how the file proj.db is found: https://github.com/OSGeo/PROJ/blob/e151e92371772c5bad5001f94f79618ca192eb5d/docs/source/faq.rst#why-am-i-getting-the-error-cannot-find-projdb

Any ideas? @jeroen

I think you should NOT use PROJ_LIB variable with proj6 because other packages will use this for proj4 data. See here: r-spatial/sf#1074

Oh ok, I wasn't suggesting it as a solution though

Looks like that will solve it though, using the API - thanks again

done, thanks heaps!

01caa85