[R-SIG-Mac] rgdal problem with wintri projection (OSX, R-3.3.0, rgdal 1.1-9)

Roger Bivand Roger.Bivand at nhh.no
Wed May 11 17:21:25 CEST 2016


On Wed, 11 May 2016, Simon Urbanek wrote:

> Thanks, that was the correct hint - updating PROJ4 to 4.9.1 seems to fix 
> the issue. The new binary is now up - until all mirrors sync up please 
> use the main Mac server:
> install.packages("rgdal",,"http://r.research.att.com")
>
> Roger, can you, please, add a corresponding regression test to rgdal so 
> a failure like the one below would be picked up on check?

Yes, of course, and thank you for resolving this so fast. The next release 
will also have extra protection contributed by Barry Rowlingson (still 
testing).

Roger

>
> Thanks,
> Simon
>
>
> On May 11, 2016, at 7:25 AM, Daniel Kelley <Dan.Kelley at Dal.Ca> wrote:
>
>> I apologize for not providing sufficient information in my original posting.  Below I am putting, in markdown notation, the test results with two setups.  I think the key thing is that R 3.3.0 is linking with an old version of proj (4.8.0) whereas R 3.2.1 was linking with a new version (4.9.1).
>>
>>
>> # Test 1 with R 3.2.1 (works)
>>
>>    R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
>>    Copyright (C) 2015 The R Foundation for Statistical Computing
>>    Platform: x86_64-apple-darwin10.8.0 (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.
>>
>>      Natural language support but running in an English locale
>>
>>    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.
>>
>>> sessionInfo()
>>    R version 3.2.1 (2015-06-18)
>>    Platform: x86_64-apple-darwin10.8.0 (64-bit)
>>    Running under: OS X 10.11.5 (unknown)
>>
>>    locale:
>>    [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>>
>>    attached base packages:
>>    [1] stats     graphics  grDevices utils     datasets  methods   base
>>> library(rgdal)
>>    Loading required package: sp
>>    rgdal: version: 0.9-3, (SVN revision 530)
>>     Geospatial Data Abstraction Library extensions to R successfully loaded
>>     Loaded GDAL runtime: GDAL 1.11.2, released 2015/02/10
>>     Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgdal/gdal
>>     Loaded PROJ.4 runtime: Rel. 4.9.1, 04 March 2015, [PJ_VERSION: 491]
>>     Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgdal/proj
>>     Linking to sp version: 1.1-0
>>> lon <- 0
>>> lat <- 0
>>> proj <- "+proj=wintri"
>>> xy <- rgdal::project(cbind(lon, lat), proj=proj)
>>> print(xy)
>>         [,1] [,2]
>>    [1,]    0    0
>>> rgdal::project(xy, proj=proj, inv=TRUE)
>>         [,1] [,2]
>>    [1,]    0    0
>>>
>>>
>>
>>
>>
>>
>> # Test 2 with R 3.3.0 (seg-faults)
>>
>>
>>    R version 3.3.0 (2016-05-03) -- "Supposedly Educational"
>>    Copyright (C) 2016 The R Foundation for Statistical Computing
>>    Platform: x86_64-apple-darwin13.4.0 (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.
>>
>>      Natural language support but running in an English locale
>>
>>    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.
>>
>>> sessionInfo()
>>    R version 3.3.0 (2016-05-03)
>>    Platform: x86_64-apple-darwin13.4.0 (64-bit)
>>    Running under: OS X 10.11.5 (El Capitan)
>>
>>    locale:
>>    [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>>
>>    attached base packages:
>>    [1] stats     graphics  grDevices utils     datasets  methods   base
>>> library(rgdal)
>>    Loading required package: sp
>>    rgdal: version: 1.1-9, (SVN revision 617M)
>>     Geospatial Data Abstraction Library extensions to R successfully loaded
>>     Loaded GDAL runtime: GDAL 1.11.4, released 2016/01/25
>>     Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgdal/gdal
>>     Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
>>     Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgdal/proj
>>     Linking to sp version: 1.2-3
>>> lon <- 0
>>> lat <- 0
>>> proj <- "+proj=wintri"
>>> xy <- rgdal::project(cbind(lon, lat), proj=proj)
>>> print(xy)
>>         lon lat
>>    [1,]   0   0
>>> rgdal::project(xy, proj=proj, inv=TRUE)
>>
>>     *** caught segfault ***
>>    address 0x0, cause 'memory not mapped'
>>
>>    Traceback:
>>     1: .Call("project_inv", as.integer(nc), as.double(xy[, 1]), as.double(xy[,     2]), proj, as.logical(use_ob_tran), PACKAGE = "rgdal")
>>     2: rgdal::project(xy, proj = proj, inv = TRUE)
>>    An irrecoverable exception occurred. R is aborting now ...
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412



More information about the R-SIG-Mac mailing list