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

Tomislav Hengl tom@heng| @end|ng |rom gm@||@com
Thu Apr 29 13:30:25 CEST 2021


Thanks Roger. If I understand correctly, I should simply replace 
'CRS("EPSG:4326")' with 'CRS("+proj=longlat +datum=WGS84 +no_defs")'. 
Otherwise the EPSG codes should work in R with any version correct?


On 4/28/21 8:48 PM, Roger Bivand wrote:
> 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
>>
>



More information about the R-sig-Geo mailing list