How to update proj4 for rgdal

I use rgdal and rgeos R packages extensively (currently with R v3.2.2). Recently, on my ubuntu machine (ubuntu v15.10), when I download the rgdal package, I see the following:

> library(rgdal) Loading required package: sp rgdal: version: 1.0-7, (SVN revision 559) Geospatial Data Abstraction Library extensions to R successfully loaded Loaded GDAL runtime: GDAL 1.11.1, released 2014/09/24 Path to GDAL shared files: /usr/local/share/gdal Loaded PROJ.4 runtime: Rel. 4.9.1, 04 March 2015, [PJ_VERSION: 491] Path to PROJ.4 shared files: (autodetected) WARNING: no proj_defs.dat in PROJ.4 shared files Linking to sp version: 1.2-1 

I saw in a recent r-sig-geo post that this is a known issue and that an update for the rgdal package has been released to fix this issue. However, despite reinstalling the rgdal package, reinstall gdal and proj4 with the following:

 sudo apt-get update && sudo apt-get install libgdal-dev libproj-dev 

I do not see the difference. This problem generates hundreds of warning messages when I use the functions of these packages.

In comparison, on my mac, if I download the rgdal package, I see

 > library(rgdal) Loading required package: sp rgdal: version: 1.0-7, (SVN revision 559) Geospatial Data Abstraction Library extensions to R successfully loaded Loaded GDAL runtime: GDAL 1.11.3, released 2015/09/16 Path to GDAL shared files: /usr/local/Cellar/gdal/1.11.3/share/gdal Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 491] Path to PROJ.4 shared files: (autodetected) Linking to sp version: 1.2-0 

So there are obviously gdal and proj.4 updates that don't get on my Linux machine.

Does anyone have any ideas how I can get updates?

Thanks!

+5
source share
2 answers

I ended up compiling both proj4 and gdal from the source, by cloning the corresponding github repositories.

https://github.com/OSGeo/proj.4

https://github.com/OSGeo/gdal

+1
source

Installing rgdal on ubuntu should work (done this 2 months ago on the amazone web server). And yes, I got errors, but I can fix it by adding a folder with additional files that were not installed during the installation of RGDAL.

0
source

Source: https://habr.com/ru/post/1234650/


All Articles