Skip to content
Snippets Groups Projects
Commit 44d3bd8a authored by Rainer M Krug's avatar Rainer M Krug Committed by Carl Boettiger
Browse files

Various changes in gdal compilation and structure (#17)

* Various changes in gdal compilation and structure

- Add dependencies to compile as homebrew gdal2 does
  https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/gdal2.rb
- Add configure options to gdal to compile as homebrew gdal2 does
- change structure slightly so that debugging is easier
- add missing definition for $MRAN

* Add odbc and curl to gdal

* Cleanup to remove external libraries

* Dependencies changed

* Move to gdal 2.1.3 and add KML support

- add some structure to dependencies

* Add LD_LIBRARY_PATH

* Fix HDF5 support

Error in detection HDF5 libraries in 2.1 branch - see
http://permalink.gmane.org/gmane.comp.gis.gdal.devel/44474 for info.

* Fixed Typo for HDF5 library location

Thanks Edzer
parent 404e8af3
No related branches found
No related tags found
No related merge requests found
FROM rocker/tidyverse:latest
MAINTAINER "Carl Boettiger" cboettig@ropensci.org
ENV GDAL_VERSION 2.1.2
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ENV GDAL_VERSION 2.1.3
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
## Add LaTeX, rticles and bookdown support
RUN echo "deb-src http://deb.debian.org/debian jessie main" >> /etc/apt/sources.list \
RUN wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz \
&& tar -xf gdal-${GDAL_VERSION}.tar.gz \
## Install dependencies of gdal-$GDAL_VERSION
## && echo "deb-src http://deb.debian.org/debian jessie main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get build-dep -y -o APT::Get::Build-Dep-Automatic=true libgdal-dev \
## && apt-get build-dep -y -o APT::Get::Build-Dep-Automatic=true libgdal-dev \
&& apt-get install -y --no-install-recommends \
libgeos-dev \
# libpng12-dev \
# libjpeg-dev \
# libgif-dev \
# libtiff-dev \
# libgeotiff-dev \
libproj-dev \
libudunits2-dev \
&& wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz \
&& tar -xf gdal-${GDAL_VERSION}.tar.gz \
libgeos-dev \
libhdf4-alt-dev \
libhdf5-dev \
libsqlite3-dev \
libfreexl-dev \
unixodbc-dev \
libexpat1-dev \
libxerces-c-dev \
libnetcdf-dev \
libudunits2-dev \
libkml-dev \
## Configure options based on homebrew gdal2 https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/gdal2.rb
&& cd gdal* \
&& ./configure && make && make install \
&& ./configure \
--with-geotiff \
--with-sqlite3 \
--with-freexl \
--with-spatialite \
--with-geos \
--with-hdf4 \
--with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial \
--with-libjson-c \
--with-netcdf \
--with-odbc \
--with-curl \
--without-grass \
--without-libgrass \
&& make \
&& make install \
&& cd .. && rm -rf gdal-* \
&& . /etc/environment \
## Install R packages labeled "core" in Spatial taskview
## Install R packages labeled "core" in Spatial taskview
&& install2.r --error --repos $MRAN \
classInt \
DCluster \
deldir \
dggridR \
# geoR \ ## Needs R built with tcl/tk support
# geoR \ ## Needs R built with tcl/tk support
gstat \
maptools \
RandomFields \
......@@ -38,5 +68,4 @@ RUN echo "deb-src http://deb.debian.org/debian jessie main" >> /etc/apt/sources.
spatstat \
spdep \
splancs
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment