Installing MAJA

The following instructions will set you up to get a working copy on your system.

Pre-compiled binary

MAJA is distributed as a self-extracting archive available from the homepage. You just have to unzip the provided package, get to the folder containing the .run installer and use the following command:

./MAJA-4-x.run --target /path/to/install

You will find the main MAJA executable file and companion tools in

/path/to/install/MAJA-X.Y.Z/bin

Available programs are:

  • maja : main executable
  • startmaja : wrapper around maja intended to help you manage with auxiliary data (eg. DTM, GIPP files, CAMS data)
  • dtmcreation : stand-alone tool to create a DTM for a given tile
  • camsdownload : stand-alone tool to download CAMS aerosols data

Compiling from sources

Requirements

In order to compile MAJA, you’ll need the following:

  • cmake >= 3.4
  • GCC with support of C++ 14
  • libbz2 and liblzma should be installed in order to use start_maja properly (these dependencies are needed to retrieve Copernicus DEM from AWS)
  • bison and flex for the compilation of HDF4, libpcre3 for SWIG, libffi for NETCDF, libssl for GDAL
  • Maja-4-x archive –> Contains the code of MAJA itself (i.e. a clone of the repo or a download of the release)

Under Ubuntu/Debian, you can install these dependencies with:

sudo apt update
sudo apt install -y cmake cmake-curses-gui gcc g++ git python3-dev bzip2 libbz2-dev liblzma-dev bison flex libpcre3-dev libffi-dev libssl-dev pkg-config
git clone https://gitlab.orfeo-toolbox.org/maja/maja.git
cd maja
git checkout release_v4.x.x

Compilation

In order to compile Maja from source, run the following commands, adapting DOWNLOAD_DIR (where the dependcies are downloaded, can be removed after compilation) and CMAKE_INSTALL_PREFIX (where Maja will be finally installed) to your wish:

cd maja # the Maja-4-x archive here
mkdir build
mkdir install
cd build
cmake ../SuperBuild \
	-DDOWNLOAD_DIR=<Path/to>/Superbuild-archives \
	-DENABLE_TU=OFF \
	-DENABLE_TV=OFF \
	-DENABLE_TVA=OFF \
	-DCMAKE_INSTALL_PREFIX=`pwd`/../install
make -j8 # adapt to the number of threads/cores of your system

From there, you’re ready to jump to next section to use startmaja

Search