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

Daniel Kelley Dan.Kelley at Dal.Ca
Wed May 11 13:25:26 CEST 2016


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 ...



More information about the R-SIG-Mac mailing list