GDAL

From ACENET
Jump to: navigation, search
Short Description
GDAL is a translator library for raster geospatial data formats.
Modulefile
gdal
Documentation
GDAL homepage
Note
GDAL may require the PROJ libraries to run, so load the appropriate modulefile like shown below.
Usage
$ module load proj gdal
$ gdalinfo
Rgdal
If you want to use GDAL with R, you need the following special instructions to install the corresponding R package rgdal:
# load the appropriate modules:
$ module purge
$ module load gcc r proj/4.7.0 gdal

# Start R:
$ R

# Then on the R prompt:
> install.packages( "rgdal", dependencies = TRUE, configure.args="--with-proj-include=$PROJ/include --with-proj-lib=$PROJ/lib --with-gdal-config=$GDAL/bin/gdal-config")
> install.packages( "rgdal", dependencies = TRUE, configure.args="--with-proj-include=$PROJ/include --with-proj-lib=$PROJ/lib --with-gdal-config=$GDAL/bin/gdal-config")

The install.packages("rgdal", ...) command can fail with configure: error: proj_api.h not found in standard or given locations. while installing the dependencies, as the packages sp and rgdal seem to be codependent, but when trying to install rgdal as a dependency for sp, the necessary configure flags are missing. Issuing the install.packages("rgdal", ...) command twice overcomes this circular dependency.