fdetsch / MODIS

Download and processing framework for MODIS imagery. The package provides automated access to the global online data archives LP DAAC, LAADS and NSIDC as well as processing capabilities such as file conversion, mosaicking, subsetting and time series.
Other
58 stars 27 forks source link

No GDAL installation found (rocker/geospatial) #88

Closed AurelioG closed 4 years ago

AurelioG commented 4 years ago

Please someone, cast some light into this: In a Ubuntu 18.04 host and rocker/geospatial container gdal is found by R. However, MODIS can't locate the library, even when the path is set.

require(rgdal) Loading required package: rgdal Loading required package: sp rgdal: version: 1.4-8, (SVN revision 845) Geospatial Data Abstraction Library extensions to R successfully loaded Loaded GDAL runtime: GDAL 2.4.0, released 2018/12/14 Path to GDAL shared files: /usr/share/gdal GDAL binary built with GEOS: TRUE Loaded PROJ.4 runtime: Rel. 5.2.0, September 15th, 2018, [PJ_VERSION: 520] Path to PROJ.4 shared files: (autodetected) Linking to sp version: 1.4-1

Sys.getenv("PATH") [1] "/usr/lib/rstudio-server/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/TinyTeX/bin/x86_64-linux/:/usr/share/gdal/"

MODIS:::checkTools('GDAL') Checking availability of GDAL: sh: 1: gdalinfo: not found

fdetsch commented 4 years ago

The image doesn't seem to ship with gdalinfo, which MODIS heavily relies upon in order to

Simply docker run with option -e ROOT=TRUE (ie. root access, see here) enabled, then sudo apt install gdal-bin from the console. Afterwards, you should be able to install MODIS successfully. You can easily verify that GDAL was found via MODISoptions(), which will detect all GDAL supported drivers.

For the record, I have been using rocker/geospatial:latest for testing.