Skip to content

CRAN releases of sp, rgdal and rgeos

23 messages · Thiago V. dos Santos, Roger Bivand, Gilles Benjamin Leduc +5 more

#
There are new releases of sp, rgdal and rgeos on CRAN. Please install sp 
first, then the other two, which link to the installed sp. They all 
address so-called rchk issues, which have not so far been a problem, but 
might have become more fragile as R's internal memory management is made 
even more efficient. This involves compiled code using memory allocated by 
R to be freed by R's garbage collector, which has to know if an object is 
still being used. Tomas Kalibera, the author of rchk, helped resolve and 
explain the issues encountered - what was good coding practice fifteen 
years ago isn't always still good practice.

In addition, the earliest versions of GDAL and PROJ with which rgdal will 
work have been updated, and set to PROJ 4.8.0 and GDAL 1.11.4. The current 
released versions of PROJ and GDAL are to be prefered, as bugs have been 
fixed and new features and drivers introduced. A check has been put 
in place to trap attempts to install rgdal without a C++11-capable 
compiler when the GDAL version is >=2.3.0 - which requires C++11. rgeos is 
ready for the forthcoming version of GEOS.

The CRAN team has also been very supportive of our efforts to bring 
compiled code in these packages into rchk compliance.

Please get in touch if you see any loose ends in these releases.

Roger
1 day later
#
Dear Roger,
Thank you very much for the excellent work done with those packages.
Today I update both rgeos and rgdal on my system - macOS 10.13.5 with all dependencies installed via MacPorts. I had updated sp a few days earlier.
The dependencies versions on my system are gdal @2.3.0.20180523_0+grib+hdf4+hdf5+jasper+mpich+netcdf and proj @5.1.0_0.
Rgeos's update went flawlessly, but I got a few errors while updating rgdal. It still compiled successfully, but I am concerned that some functionality might be compromised due to the errors.
This is what I got (I have to manually specify the location of proj or rgdal won't find it):> install.packages('rgdal', type = "source", configure.args=c(
+     '--with-proj-include=/opt/local/lib/proj5/include',
+     '--with-proj-lib=/opt/local/lib/proj5/lib'))
Installing package into ?/Users/thiago/Documents/R-packages?
(as ?lib? is unspecified)
trying URL 'https://cran.r-project.org/src/contrib/rgdal_1.3-2.tar.gz'
Content type 'application/x-gzip' length 1667049 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

* installing *source* package ?rgdal? ...
** package ?rgdal? successfully unpacked and MD5 sums checked
configure: CC: /usr/bin/clang
configure: CXX: /usr/bin/clang++
configure: rgdal: 1.3-2
checking for /usr/bin/svnversion... yes
configure: svn revision: 755
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++ accepts -g... yes
checking whether /usr/bin/clang++ supports C++11 features by default... no
checking whether /usr/bin/clang++ supports C++11 features with -std=gnu++11... yes
configure: C++11 support available
checking for gdal-config... /opt/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.0
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking gdal: linking with --libs only... yes
checking GDAL: /opt/local/share/gdal/pcs.csv readable... yes
checking proj_api.h presence and usability... yes
./configure: line 3395: test: =: unary operator expected
checking PROJ version >= 4.8.0... yes
checking projects.h presence and usability... yes
Undefined symbols for architecture x86_64:
  "_pj_ctx_fclose", referenced from:
      _main in proj_conf_test2-06fe7d.o
  "_pj_get_default_ctx", referenced from:
      _main in proj_conf_test2-06fe7d.o
  "_pj_open_lib", referenced from:
      _main in proj_conf_test2-06fe7d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
./configure: line 3511: ./proj_conf_test2: No such file or directory
checking PROJ.4: epsg found and readable... yes
Undefined symbols for architecture x86_64:
  "_pj_ctx_fclose", referenced from:
      _main in proj_conf_test3-3b7aa2.o
  "_pj_get_default_ctx", referenced from:
      _main in proj_conf_test3-3b7aa2.o
  "_pj_open_lib", referenced from:
      _main in proj_conf_test3-3b7aa2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
./configure: line 3570: ./proj_conf_test3: No such file or directory
checking PROJ.4: conus found and readable... yes
configure: Package CPP flags:  -I/opt/local/include -I/opt/local/lib/proj5/include
configure: Package LIBS:  -L/opt/local/lib -lgdal -L/opt/local/lib/proj5/lib -lproj
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c OGR_write.cpp -o OGR_write.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c gdal-bindings.cpp -o gdal-bindings.o
/usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c init.c -o init.o
/usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c inverser.c -o inverser.o
/usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c local_stubs.c -o local_stubs.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c ogr_geom.cpp -o ogr_geom.o
/usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2  -c ogr_polygons.c -o ogr_polygons.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c ogr_proj.cpp -o ogr_proj.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c ogrsource.cpp -o ogrsource.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/local/include -I/opt/local/lib/proj5/include -I"/Users/thiago/Documents/R-packages/sp/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c projectit.cpp -o projectit.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o rgdal.so OGR_write.o gdal-bindings.o init.o inverser.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o -L/opt/local/lib -lgdal -L/opt/local/lib/proj5/lib -lproj -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/thiago/Documents/R-packages/rgdal/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (rgdal)

The downloaded source packages are in
    ?/private/var/folders/_z/01gg71zs19g816v6m2dddt8w0000gn/T/Rtmp5K6lt8/downloaded_packages?
?
Is this something that needs to be investigated, or I can just safely ignore those messages?
Many thanks,?-- Thiago V. dos Santos
Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan
On Friday, June 8, 2018, 2:15:43 PM EDT, Roger Bivand <Roger.Bivand at nhh.no> wrote:
There are new releases of sp, rgdal and rgeos on CRAN. Please install sp 
first, then the other two, which link to the installed sp. They all 
address so-called rchk issues, which have not so far been a problem, but 
might have become more fragile as R's internal memory management is made 
even more efficient. This involves compiled code using memory allocated by 
R to be freed by R's garbage collector, which has to know if an object is 
still being used. Tomas Kalibera, the author of rchk, helped resolve and 
explain the issues encountered - what was good coding practice fifteen 
years ago isn't always still good practice.

In addition, the earliest versions of GDAL and PROJ with which rgdal will 
work have been updated, and set to PROJ 4.8.0 and GDAL 1.11.4. The current 
released versions of PROJ and GDAL are to be prefered, as bugs have been 
fixed and new features and drivers introduced. A check has been put 
in place to trap attempts to install rgdal without a C++11-capable 
compiler when the GDAL version is >=2.3.0 - which requires C++11. rgeos is 
ready for the forthcoming version of GEOS.

The CRAN team has also been very supportive of our efforts to bring 
compiled code in these packages into rchk compliance.

Please get in touch if you see any loose ends in these releases.

Roger
#
Thanks for reporting, comments inline below (note that I have no OSX 
access at all):
On Sat, 9 Jun 2018, Thiago V. dos Santos wrote:

            
All OK up to the GDAL version returned by gdal-config - are you using the 
released GDAL 2.3.0 (probably not) or master?
Will check, that line is:

if test ${PROJ_VERSION} = "" ; then

from configure.ac line 305. Possibly a shell dialect issue.
These relate to configure.ac lines 376-419, and the outcome: epsg found 
and readable is OK - could there be two libproj on your system (maybe for 
different architectures)?
Same here for next block in configure.ac; conus found and readable.
Please try to run:

tools::testInstalledPackage("rgdal", outDir=tempdir())
list.files(tempdir())
file.show(file.path(tempdir(), "rgdal-Ex.Rout"))

and if the outcomes are as expected, you should be OK, please let us know.

If any OSX users installing from source can contribute, that would be 
useful. It will take a little while before the CRAN OSX binaries catch up 
with new PROJ and GDAL.

Again thanks for reporting!

Roger

  
    
#
Good monday! 

I tried to update rgdal, I get a warning telling me the installation had a non-null exit status. I haven't cheak if it was working? 

Benjamin 
 
 
Le Vendredi 8 Juin 2018 18:15 GMT, Roger Bivand <Roger.Bivand at nhh.no> a ?crit:
#
On Mon, 11 Jun 2018, Gilles Benjamin Leduc wrote:

            
Thanks for responding - every user data point helps!

Could you please provide the output of sessionInfo(), and any error 
messages you see on trying to update?

Roger

  
    
#
Hi,

I have been able to install all three without issue.  I have encountered no issues with usage.
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rgeos_0.3-28 rgdal_1.3-2  sp_1.3-1    

loaded via a namespace (and not attached):
[1] compiler_3.5.0  tools_3.5.0     grid_3.5.0      lattice_0.20-35

Thanks for all you do!

Cheers,
Ben
Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecological Forecasting: https://eco.bigelow.org/
#
On Mon, 11 Jun 2018, Ben Tupper wrote:

            
Ben,

Thanks for this report. How did you install rgdal - CRAN binary (now at 
1.3.2 for R 3.5.0) or source install using GDAL and PROJ installed in what 
way? It's useful to record ways in which installation on OSX has been 
accomplished.

Roger

  
    
#
Hi,

I used CRAN binary ala ...
I used that same for sp and rgeos.  

Ben
Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecological Forecasting: https://eco.bigelow.org/
#
On Mon, 11 Jun 2018, Ben Tupper wrote:

            
Good, thanks. They probably do not have the very latest versions of the 
external dependencies, but do work and provide a reasonable selection of 
GDAL drivers.

Roger

  
    
#
It's quite a selection of drivers, but my driver world has a short horizon.
name                                                long_name create  copy isRaster
1           AAIGrid                                      Arc/Info ASCII Grid  FALSE  TRUE     TRUE
2              ACE2                                                     ACE2  FALSE FALSE     TRUE
3              ADRG                            ARC Digitized Raster Graphics   TRUE FALSE     TRUE
4               AIG                                     Arc/Info Binary Grid  FALSE FALSE     TRUE
5            AirSAR                                AirSAR Polarimetric Image  FALSE FALSE     TRUE
6               ARG                                Azavea Raster Grid format  FALSE  TRUE     TRUE
7               BAG                               Bathymetry Attributed Grid  FALSE FALSE     TRUE
8            BIGGIF                       Graphics Interchange Format (.gif)  FALSE FALSE     TRUE
9               BLX                                     Magellan topo (.blx)  FALSE  TRUE     TRUE
10              BMP                     MS Windows Device Independent Bitmap   TRUE FALSE     TRUE
11              BSB                              Maptech BSB Nautical Charts  FALSE FALSE     TRUE
12               BT                      VTP .bt (Binary Terrain) 1.3 Format   TRUE FALSE     TRUE
13             CALS                                            CALS (Type 1)  FALSE  TRUE     TRUE
14             CEOS                                               CEOS Image  FALSE FALSE     TRUE
15            COASP                          DRDC COASP SAR Processor Raster  FALSE FALSE     TRUE
16            COSAR               COSAR Annotated Binary Matrix (TerraSAR-X)  FALSE FALSE     TRUE
17              CPG                                          Convair PolGASP  FALSE FALSE     TRUE
18          CTable2                                 CTable2 Datum Grid Shift   TRUE FALSE     TRUE
19              CTG                           USGS LULC Composite Theme Grid  FALSE FALSE     TRUE
20            DIMAP                                               SPOT DIMAP  FALSE FALSE     TRUE
21            DIPEx                                                    DIPEx  FALSE FALSE     TRUE
22             DOQ1                                     USGS DOQ (Old Style)  FALSE FALSE     TRUE
23             DOQ2                                     USGS DOQ (New Style)  FALSE FALSE     TRUE
24             DTED                                    DTED Elevation Raster  FALSE  TRUE     TRUE
25          E00GRID                                 Arc/Info Export E00 GRID  FALSE FALSE     TRUE
26          ECRGTOC                                          ECRG TOC format  FALSE FALSE     TRUE
27             EHdr                                       ESRI .hdr Labelled   TRUE  TRUE     TRUE
28              EIR                                        Erdas Imagine Raw  FALSE FALSE     TRUE
29             ELAS                                                     ELAS   TRUE FALSE     TRUE
30             ENVI                                       ENVI .hdr Labelled   TRUE FALSE     TRUE
31              ERS                                   ERMapper .ers Labelled   TRUE FALSE     TRUE
32             ESAT                                     Envisat Image Format  FALSE FALSE     TRUE
33             FAST                                        EOSAT FAST Format  FALSE FALSE     TRUE
34              FIT                                                FIT Image  FALSE  TRUE     TRUE
35          FujiBAS                                   Fuji BAS Scanner Image  FALSE FALSE     TRUE
36           GenBin                           Generic Binary (.hdr Labelled)  FALSE FALSE     TRUE
37              GFF Ground-based SAR Applications Testbed File Format (.gff)  FALSE FALSE     TRUE
38              GIF                       Graphics Interchange Format (.gif)  FALSE  TRUE     TRUE
39              GMT                                   GMT NetCDF Grid Format  FALSE  TRUE     TRUE
40             GPKG                                               GeoPackage   TRUE  TRUE     TRUE
41   GRASSASCIIGrid                                         GRASS ASCII Grid  FALSE FALSE     TRUE
42             GRIB                                    GRIdded Binary (.grb)  FALSE FALSE     TRUE
43            GS7BG                     Golden Software 7 Binary Grid (.grd)   TRUE  TRUE     TRUE
44             GSAG                        Golden Software ASCII Grid (.grd)  FALSE  TRUE     TRUE
45             GSBG                       Golden Software Binary Grid (.grd)   TRUE  TRUE     TRUE
46              GSC                                              GSC Geogrid  FALSE FALSE     TRUE
47            GTiff                                                  GeoTIFF   TRUE  TRUE     TRUE
48              GTX                                 NOAA Vertical Datum .GTX   TRUE FALSE     TRUE
49              GXF                             GeoSoft Grid Exchange Format  FALSE FALSE     TRUE
50             HDF5                       Hierarchical Data Format Release 5  FALSE FALSE     TRUE
51        HDF5Image                                             HDF5 Dataset  FALSE FALSE     TRUE
52              HF2                               HF2/HFZ heightfield raster  FALSE  TRUE     TRUE
53              HFA                              Erdas Imagine Images (.img)   TRUE  TRUE     TRUE
54             HTTP                                    HTTP Fetching Wrapper  FALSE FALSE     TRUE
55              IDA                                  Image Data and Analysis   TRUE FALSE     TRUE
56            ILWIS                                         ILWIS Raster Map   TRUE  TRUE     TRUE
57             INGR                                        Intergraph Raster   TRUE  TRUE     TRUE
58             IRIS                             IRIS data (.PPI, .CAPPi etc)  FALSE FALSE     TRUE
59             ISCE                                              ISCE raster   TRUE FALSE     TRUE
60            ISIS2                  USGS Astrogeology ISIS cube (Version 2)   TRUE FALSE     TRUE
61            ISIS3                  USGS Astrogeology ISIS cube (Version 3)  FALSE FALSE     TRUE
62       JAXAPALSAR               JAXA PALSAR Product Reader (Level 1.1/1.5)  FALSE FALSE     TRUE
63             JDEM                                      Japanese DEM (.mem)  FALSE FALSE     TRUE
64             JPEG                                                JPEG JFIF  FALSE  TRUE     TRUE
65  KMLSUPEROVERLAY                                        Kml Super Overlay  FALSE  TRUE     TRUE
66              KRO                                                KOLOR Raw   TRUE FALSE     TRUE
67              L1B                     NOAA Polar Orbiter Level 1b Data Set  FALSE FALSE     TRUE
68              LAN                                          Erdas .LAN/.GIS   TRUE FALSE     TRUE
69              LCP                        FARSITE v.4 Landscape File (.lcp)  FALSE  TRUE     TRUE
70         Leveller                                     Leveller heightfield   TRUE FALSE     TRUE
71           LOSLAS                        NADCON .los/.las Datum Grid Shift  FALSE FALSE     TRUE
72              MAP                                         OziExplorer .MAP  FALSE FALSE     TRUE
73          MBTiles                                                  MBTiles   TRUE  TRUE     TRUE
74              MEM                                         In Memory Raster   TRUE FALSE     TRUE
75              MFF                                        Vexcel MFF Raster   TRUE  TRUE     TRUE
76             MFF2                                 Vexcel MFF2 (HKV) Raster   TRUE  TRUE     TRUE
77              MRF                                       Meta Raster Format   TRUE  TRUE     TRUE
78             MSGN                           EUMETSAT Archive native (.nat)  FALSE FALSE     TRUE
79              NDF                                        NLAPS Data Format  FALSE FALSE     TRUE
80           netCDF                               Network Common Data Format   TRUE  TRUE     TRUE
81         NGSGEOID                              NOAA NGS Geoid Height Grids  FALSE FALSE     TRUE
82             NITF                     National Imagery Transmission Format   TRUE  TRUE     TRUE
83             NTv2                                    NTv2 Datum Grid Shift   TRUE FALSE     TRUE
84          NWT_GRC               Northwood Classified Grid Format .grc/.tab  FALSE FALSE     TRUE
85          NWT_GRD                  Northwood Numeric Grid Format .grd/.tab  FALSE FALSE     TRUE
86              OZI                                   OziExplorer Image File  FALSE FALSE     TRUE
87             PAux                                        PCI .aux Labelled   TRUE FALSE     TRUE
88           PCIDSK                                     PCIDSK Database File   TRUE FALSE     TRUE
89         PCRaster                                     PCRaster Raster File   TRUE  TRUE     TRUE
90              PDF                                           Geospatial PDF   TRUE  TRUE     TRUE
91              PDS                               NASA Planetary Data System  FALSE FALSE     TRUE
92         PLMOSAIC                                  Planet Labs Mosaics API  FALSE FALSE     TRUE
93         PLSCENES                                   Planet Labs Scenes API  FALSE FALSE     TRUE
94              PNG                                Portable Network Graphics  FALSE  TRUE     TRUE
95              PNM                          Portable Pixmap Format (netpbm)   TRUE FALSE     TRUE
96                R                                      R Object Data Store  FALSE  TRUE     TRUE
97       Rasterlite                                               Rasterlite  FALSE  TRUE     TRUE
98              RIK                                  Swedish Grid RIK (.rik)  FALSE FALSE     TRUE
99              RMF                                     Raster Matrix Format   TRUE FALSE     TRUE
100         ROI_PAC                                           ROI_PAC raster   TRUE FALSE     TRUE
101          RPFTOC                         Raster Product Format TOC format  FALSE FALSE     TRUE
102             RS2                                   RadarSat 2 XML Product  FALSE FALSE     TRUE
103             RST                                        Idrisi Raster A.1   TRUE  TRUE     TRUE
104            SAFE                              Sentinel-1 SAR SAFE Product  FALSE FALSE     TRUE
105            SAGA                             SAGA GIS Binary Grid (.sdat)   TRUE  TRUE     TRUE
106        SAR_CEOS                                           CEOS SAR Image  FALSE FALSE     TRUE
107            SDTS                                              SDTS Raster  FALSE FALSE     TRUE
108       SENTINEL2                                               Sentinel 2  FALSE FALSE     TRUE
109             SGI                                SGI Image File Format 1.0   TRUE FALSE     TRUE
110          SNODAS                            Snow Data Assimilation System  FALSE FALSE     TRUE
111             SRP                      Standard Raster Product (ASRP/USRP)  FALSE FALSE     TRUE
112         SRTMHGT                                      SRTMHGT File Format  FALSE  TRUE     TRUE
113        Terragen                                     Terragen heightfield   TRUE FALSE     TRUE
114             TIL                                          EarthWatch .TIL  FALSE FALSE     TRUE
115             TSX                                       TerraSAR-X Product  FALSE FALSE     TRUE
116         USGSDEM                       USGS Optional ASCII DEM (and CDED)  FALSE  TRUE     TRUE
117           VICAR                                          MIPL VICAR file  FALSE FALSE     TRUE
118             VRT                                           Virtual Raster   TRUE  TRUE     TRUE
119             WCS                                 OGC Web Coverage Service  FALSE FALSE     TRUE
120             WMS                                      OGC Web Map Service  FALSE  TRUE     TRUE
121            WMTS                                 OGC Web Mab Tile Service  FALSE  TRUE     TRUE
122             XPM                                        X11 PixMap Format  FALSE  TRUE     TRUE
123             XYZ                                        ASCII Gridded XYZ  FALSE  TRUE     TRUE
124            ZMap                                           ZMap Plus Grid  FALSE  TRUE     TRUE
Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Ecological Forecasting: https://eco.bigelow.org/
#
Hi Roger, thanks for the follow up. Answering to your comments:

a) I am using Macports's gdal version?2.3.0.20180523. I am pretty sure that its source code (i.e. the one that is compiled on my machine) is downloaded from OSGEO (at least according to?https://github.com/macports/macports-ports/blob/master/gis/gdal/Portfile);

b) I do have more than one libproj installed on my system (as QGIS for macOS requires its own gdal and proj stuff), but only the Macports one is on my path;


c) I tried running:
tools::testInstalledPackage("rgdal", outDir=tempdir())list.files(tempdir())file.show(file.path(tempdir(), "rgdal-Ex.Rout"))

but it unexpectedly returned "Error in library("rgdal") : there is no package called ?rgdal?. Execution halted".

It looks weird but so far I am able to normally load and use at least a couple of rgdal's functions.

I will keep monitoring it though, and report any other issue.

Cheers,
?-- Thiago V. dos Santos
Postdoctoral Research FellowDepartment of Climate and Space Science and EngineeringUniversity of Michigan
On Sunday, June 10, 2018, 4:46:04 AM EDT, Roger Bivand <Roger.Bivand at nhh.no> wrote:
Thanks for reporting, comments inline below (note that I have no OSX 
access at all):
On Sat, 9 Jun 2018, Thiago V. dos Santos wrote:

            
All OK up to the GDAL version returned by gdal-config - are you using the 
released GDAL 2.3.0 (probably not) or master?
Will check, that line is:

if test ${PROJ_VERSION} = "" ; then

from configure.ac line 305. Possibly a shell dialect issue.
These relate to configure.ac lines 376-419, and the outcome: epsg found 
and readable is OK - could there be two libproj on your system (maybe for 
different architectures)?
Same here for next block in configure.ac; conus found and readable.
Please try to run:

tools::testInstalledPackage("rgdal", outDir=tempdir())
list.files(tempdir())
file.show(file.path(tempdir(), "rgdal-Ex.Rout"))

and if the outcomes are as expected, you should be OK, please let us know.

If any OSX users installing from source can contribute, that would be 
useful. It will take a little while before the CRAN OSX binaries catch up 
with new PROJ and GDAL.

Again thanks for reporting!

Roger

  
    
#
I too use R on a mac but I cannot get rgdal to use proj5 (port info proj).
rgdal still uses proj4 even when there is a newer version of proj already
on my computer.  Neither of these proj packages (proj4 or proj) use
pkg-config mechanism even though there are proj.pc files in both versions
of the package.  Maybe using the pkg-config mechanism to detect version of
packages during source installation might help?  I don't know whether this
is a "proj" or a "macports" issue though.


On Mon, Jun 11, 2018 at 7:54 PM, Thiago V. dos Santos via R-sig-Geo <
r-sig-geo at r-project.org> wrote:

            

  
    
#
On Tue, 12 Jun 2018, Vijay Lulla wrote:

            
Neither sp/rgdal nor sf plan to accomodate the proj.h interface until the 
GDAL barn-raising project is completed. Even then, most software using 
proj will have to support the proj_api.h and the proj.h APIs because many 
platforms are bound to move at the speed of the slowest package using 
proj. The proj_api.h API does use the new mechanisms internally, but it 
isn't obvious how or whether proj.h pipelines should be exposed (GRASS has 
a prototype implementation).

If you work in geodetics and need sub-cm precision, this may matter; in 
which case please follow the GDAL barn-raising project and provide use 
cases where the proj.h API is required. The main difference is that the 
proj_api.h API always transforms to the WGS84 datum first then transforms 
to the target datum (many to one then one to many). When this was chosen 
1984 was not so long ago; the new proj.h API suggests transforming along a 
pipeline from source to target datum without going through WGS84 (many to 
many).

If your question is about how to install rgdal from source on OSX, you may 
need to ensure that you only have one version of proj installed, or use 
configure arguments and load path modifications on your own 
responsibility.
#
Thank you for the explanation of difference between proj.h and proj_api.h
and the recommendation of setting environment variable for pkg-config.  I
had tried using pkg-config by setting env variables but haven't had much
luck getting it to work.
Cordially,
Vijay.
On Tue, Jun 12, 2018 at 3:11 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:

            

  
    
#
proj.5 contains new features, but none of these are, or will in the near
future be available to R users. All our (= Roger + me) efforts so far
have been to get software (rgdal, sf) running with proj.5, not to expose
any of its new features.
See also https://github.com/r-spatial/sf/issues/545

Also: if anyone insists on installing rgdal or sf from source on a Mac
but doesn't use the setup CRAN uses for building binaries, neither Roger
nor I can assist in case of problems beyond wildly guessing. Of course,
any help from anyone else on these kind of issues is highly appreciated.
On 06/12/2018 04:41 PM, Vijay Lulla wrote:

  
    
#
What is the setup that CRAN uses?  Where can I find this information?

I install most of the R packages on my mac from source and I will be happy
to help (mostly with answering questions and sharing my notes about how I
get packages to compile).

On Tue, Jun 12, 2018 at 12:00 PM, Edzer Pebesma <
edzer.pebesma at uni-muenster.de> wrote:

            

  
    
#
On 06/12/2018 07:49 PM, Vijay Lulla wrote:
The last two links of https://cran.r-project.org/bin/macosx/ point you
to the libraries it statically links to; further info maybe
https://github.com/r-spatial/sf/issues/327 (or search sf issues for "simon")

  
    
5 days later
#
Success!

This morning I upgraded a Mac to OS 10.13.5 (the so-called High Sierra version), then

 - Installed R 3.5.0 from CRAN (installed ever 3.3.x)
 - Installed sp 1.3-1, rgdal 1.3-2, rgeos 0.3-28, also sf 0.6-3, from the CRAN binaries that are now available
 - Ran my personal test suite, which exercises the kinds of tasks I perform with those packages

All tests succeeded.

I forgot to control the order of installation, so I don't know if I installed sp first, as advised. But I expect that with the binary versions it doesn't matter.

(I don't think it matters for the above, but I also installed the clang and gfortran version provided on CRAN's Mac "tools" page, and successfully compiled some source packages that require fortran, and others that require C).

Thank again for all your work
-Don

--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

?On 6/8/18, 11:15 AM, "R-sig-Geo on behalf of Roger Bivand" <r-sig-geo-bounces at r-project.org on behalf of Roger.Bivand at nhh.no> wrote:

    There are new releases of sp, rgdal and rgeos on CRAN. Please install sp 
    first, then the other two, which link to the installed sp. They all 
    address so-called rchk issues, which have not so far been a problem, but 
    might have become more fragile as R's internal memory management is made 
    even more efficient. This involves compiled code using memory allocated by 
    R to be freed by R's garbage collector, which has to know if an object is 
    still being used. Tomas Kalibera, the author of rchk, helped resolve and 
    explain the issues encountered - what was good coding practice fifteen 
    years ago isn't always still good practice.
    
    In addition, the earliest versions of GDAL and PROJ with which rgdal will 
    work have been updated, and set to PROJ 4.8.0 and GDAL 1.11.4. The current 
    released versions of PROJ and GDAL are to be prefered, as bugs have been 
    fixed and new features and drivers introduced. A check has been put 
    in place to trap attempts to install rgdal without a C++11-capable 
    compiler when the GDAL version is >=2.3.0 - which requires C++11. rgeos is 
    ready for the forthcoming version of GEOS.
    
    The CRAN team has also been very supportive of our efforts to bring 
    compiled code in these packages into rchk compliance.
    
    Please get in touch if you see any loose ends in these releases.
    
    Roger
    
    -- 
    Roger Bivand
    Department of Economics, Norwegian School of Economics,
    Helleveien 30, N-5045 Bergen, Norway.
    voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
    http://orcid.org/0000-0003-2392-6140
    https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
    
    _______________________________________________
    R-sig-Geo mailing list
    R-sig-Geo at r-project.org
    https://stat.ethz.ch/mailman/listinfo/r-sig-geo
#
On Mon, 18 Jun 2018, MacQueen, Don wrote:

            
Thanks for reporting - especially on your own test suite. We do what we 
can to cover typical use cases, but independent testing in production 
settings is reassuring for everybody. We're expecting more PROJ-based 
changes later this year and next year, so it is great to have external 
test sets to be able to check where any changes in output are coming from.

This is an encouragement to other users whose production depends on R 
packages using GDAL, PROJ and/or GEOS to follow this example and keep a 
script handy to test your use cases, and a history of output files with 
which to compare (diff). We don't worry about changes in the EPSG 
versions, but by next year they may be properly anchored too (changes in 
PROJ may include reference system definitions with timestamps).
Right, the binary builds use the sp version on the build platform.

Best wishes,

Roger

  
    
#
Two weeks ago I installed new GDAL 2.3.* from source, then tried 
installing rgdal and got the error about GDAL requires C++11. Then I had 
to remove everything and reinstall GDAL 2.2. Would love to be able to 
start using the newest GDAL inside R as it seems that many things have 
been improved 
(https://trac.osgeo.org/gdal/query?group=status&milestone=2.3.0). 
Installing GDAL from source takes >20mins so next time I would like to 
be sure that I will not have to remove GDAL.

Can somebody point to a step-by-step guide to install GDAL 2.3.* and 
rgdal on ubuntu (now that all packages have been updated)?

Much appreciated!

My session info:

 > library(rgdal)
Loading required package: sp
rgdal: version: 1.2-20, (SVN revision 725)
 ?Geospatial Data Abstraction Library extensions to R successfully loaded
 ?Loaded GDAL runtime: GDAL 2.2.2, released 2017/09/15
 ?Path to GDAL shared files: /usr/share/gdal/2.2
 ?GDAL binary built with GEOS: TRUE
 ?Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
 ?Path to PROJ.4 shared files: (autodetected)
 ?Linking to sp version: 1.2-7
 > sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /opt/microsoft/ropen/3.5.0/lib64/R/lib/libRblas.so
LAPACK: /opt/microsoft/ropen/3.5.0/lib64/R/lib/libRlapack.so
On 19.06.2018 08:47, Roger Bivand wrote:

  
  
#
On Tue, 19 Jun 2018, Tomislav Hengl wrote:

            
Tom:

There is too little information here: which g++ compiler version, was R 
installed from source or not, GDAL was installed from source, but was PROJ 
installed from source (and/or GEOS), ... and no verbatim error message.

Please try development rgdal_1.3-3 from R-forge, which has some logic 
fixes in configure:

install.packages("rgdal", repos="http://R-Forge.R-project.org")

Did you check whether sf installed with GDAL 2.3.0 and PROJ 5.1.0?

It looks as though CRAN devel debian is using GDAL 2.3.0 (the test saved 
output is 2.2.4):

https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/rgdal-00check.html

Hope this helps,

Roger

  
    
#
Hi Roger,

I have now managed to reinstall GDAL 2.3 and the latest versions of 
rgdal and sf. These are the steps I have followed:

1. First remove existing installation of GDAL using:

sudo apt-get purge --auto-remove gdal-bin

*this also removes QGIS / anything linked with GDAL.

2. Download GDAL source code 
(https://trac.osgeo.org/gdal/wiki/DownloadSource) and follow the 
instructions to install from source 
(https://trac.osgeo.org/gdal/wiki/BuildingOnUnix)

3. Installation from source code takes quite some time (10-15 minutes). 
After that I get:

gdalinfo --version
GDAL 2.3.0, released 2018/05/04

4. Install rgdal from R-forge using e.g.:

R CMD INSTALL rgdal_1.3-3.tar.gz
* installing to library ?/opt/microsoft/ropen/3.4.3/lib64/R/library?
* installing *source* package ?rgdal? ...
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 1.3-3
checking for /usr/bin/svnversion... yes
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision:
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
configure: C++11 support available
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.3.0
checking C++11 support for GDAL >= 2.3.0... yes
checking GDAL version >= 1.11.4... yes
checking gdal: linking with --libs only... yes
checking GDAL: /usr/local/share/gdal/pcs.csv readable... yes
configure: pkg-config proj exists, will use it
configure: PROJ version: 4.9.2
checking proj_api.h presence and usability... yes
checking PROJ version >= 4.8.0... yes
checking projects.h presence and usability... yes
checking PROJ.4: epsg found and readable... yes
checking PROJ.4: conus found and readable... yes
configure: Package CPP flags:  -I/usr/local/include
configure: Package LIBS:  -L/usr/local/lib -lgdal -lproj
configure: creating ./config.status

For sf I had to manually update DBI and units packages as it requires 
newest versions.

So now everything works fine. Thank you!

Tom
On 06/19/2018 10:41 AM, Roger Bivand wrote:
5 days later
#
Few more notes on installation of GDAL 2.3.

I was installing GDAL and rgdal on another Ubuntu machine and I 
experiences multiple problems with more installations of GDAL and proj4 
probably ("unable to load shared object rgdal.so" error). This is what I 
realized needs to be done before installing GDAL from source:

1. Install libgdal-dev and libroj-dev (very important otherwise the 
installation of rgdal will fail)

|sudo apt-get install libgdal-dev libproj-dev|

2. Download GDAL source code 
(https://trac.osgeo.org/gdal/wiki/DownloadSource) and probably best 
install it using the checkinstall package:

sudo apt install checkinstall

wget http://download.osgeo.org/gdal/2.3.0/gdal-2.3.0.tar.gz

tar -xvzf gdal-2.3.0.tar.gz

cd gdal-2.3.0

./configure

sudo checkinstall

*checkinstall took 20 minutes on my system, so be ready to take coffee 
and relax.

3. This would build a debian package that can then be normally installed 
and removed using the gdebi.

4. Install rgdal using install.packages("rgdal")

Thanks Roger for keeping everything up-to-date and stable! GDAL is the 
backbone of almost any GIS project I run.

Tom
On 19.06.2018 16:57, Tomislav Hengl wrote: