[R-sig-Geo] Error in CRS("EPSG:4326") : no arguments in initialization list

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Wed Apr 28 20:48:01 CEST 2021


Tom,

Your package code itself runs lots of stuff in R/AAA.R that it doesn't 
need to. Here you could simply put the output string of:

> rgdal::CRSargs(sp::CRS("EPSG:4326"))
[1] "+proj=longlat +datum=WGS84 +no_defs"

instead of going out to sp/rgdal/PROJ. In this case, sp and rgdal 
shouldn't let you do this on a system running PROJ 5.2.0 (and I'll look at 
that), but your work-around is the bare Proj4 string, which is the same in 
any case. The error message is from PROJ, returned from rgdal to sp. If 
you want to condition on PROJ version, you can do that, but instantiating 
CRS is costly, and here lazy-loading is trying to save time by 
pre-filling the value.

If this isn't enough, please let me know and I'll install the same PROJ 
and GDAL versions as used for Solaris checks locally, and try to resolve 
the problem in those packages. That will however take time. I'm assuming 
that sp and rgdal are the current CRAN versions 1.4-5 and 1.5-23 on 
Solaris, both of those pass on that platform.

Hope this helps,

Roger

On Wed, 28 Apr 2021, Tomislav Hengl wrote:

>
> Hi Roger et al,
>
> We are experiencing some problems with committing plotKML to CRAN. Automated 
> check reports:
>
> "Error in CRS("EPSG:4326") : no arguments in initialization list"
>
> See:
>
> https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/plotKML-00install.html
> https://github.com/Envirometrix/plotKML/issues/5
>
> I assume it has to do with the proj / rgdal versions? Should I switch to 
> using again CRS("+init=epsg:4326")? Seems that different operating systems 
> now have different issues.
>
> On R-forge plotKML installs without problems:
>
> https://r-forge.r-project.org/R/?group_id=1106
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
e-mail: Roger.Bivand using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list