-
Notifications
You must be signed in to change notification settings - Fork 298
Installation Guide
HarryZhu edited this page May 1, 2018
·
4 revisions
- gdal >= 2.1 # for data structure
- geos >= 3.5 # for data manipulation
- pro4j # for projection
- udunits # for units
- postgresql[optional]
- lwgeom[optional] # for geohash
Centos7 default repo gives you gdal1.1, geos 2.x. However, sf::st_voronoi need geos >=3.5 and sf need gdal >= 2.1.
go to http://trac.osgeo.org/gdal/wiki/DownloadSource to fetch latest gdal version.
wget http://download.osgeo.org/gdal/2.2.4/gdal-2.2.4.zip
unzip and compile to install
unzip gdal-2.2.4.zip
cd gdal-2.2.4
./configure
make
make install
checkout you replaced the default gdal:
echo "/usr/local/lib" > /etc/ld.so.conf.d/libgdal-x86_64.conf
sudo ldconfig # relink to new gdal # need to relogin R
install geos-devel for lwgeom
sudo yum install -y geos-devel
go to https://trac.osgeo.org/geos to get latest geos version.
wget http://download.osgeo.org/geos/geos-3.6.2.tar.bz2
unzip
tar -xjf geos-3.6.2.tar.bz2
and do the rest things like previous gdal process.
install system dependency
sudo yum install udunits2-devel
install.packages("udunits2",configure.args='--with-udunits2-include=/usr/include/udunits2/')
install postgresql-devel
sudo yum install postgresql-devel
install RPostgreSQL
install.packages("RPostgreSQL",dependencies=TRUE)
sudo yum install -y liblwgeom
install.packages("lwgeom")