Installation

GECORIS is tested on latest GNU/Linux distributions and partly on MS Windows 10. Recommended minimum setup:

  • Python 3.6

  • SNAP 8.0

We recommend using anaconda environment to install gecoris along with SNAP and all Python dependencies.

1. Install miniconda

2. Create Python environment

For SNAP, Python ≤ 3.6 is required:

conda create -n gecoris python=3.6
conda activate gecoris

3. Install Python dependencies

conda install numpy scipy matplotlib pandas shapely requests scikit-image h5py=2.10
conda install -c conda-forge gdal netcdf4

4. Install SNAP including Sentinel-1 toolbox.

Note

GNU/Linux users:

Install additional dependency:

sudo apt-get install libgfortran3 libgfortran5 python3-distutils

libgfortran3 was discontinued on Ubuntu 20 based distros. It must be downloaded and installed manually from here with additional gcc dependency.

5. Configure SNAP with Python

cd <snap-install-dir>/bin
./snappy-conf <python-exe>

where <snap-install-dir> is SNAP installation directory and <python-exe> is full path to conda Python binaries (e.g., <miniconda-install-dir>/envs/gecoris/python on Linux).

Install snappy package:

cd <snappy-dir>
python setup.py install

where <snappy-dir> is package directory (e.g., $HOME/.snap/snap-python/snappy on Linux).

More detailed instructions can be found here.

Warning

Keep the SNAP updated either via GUI or using the supplied update_snap.sh script.

6. Download development version of gecoris and setup

git clone https://memorid@bitbucket.org/memorid/gecoris.git

Edit PATH environmental variables:

  • on GNU/Linux, append to .bashrc file

export gecoris_HOME=~/sw/gecoris
export PYTHONPATH=${PYTHONPATH}:${gecoris_HOME}
export PATH=${PATH}:${gecoris_HOME}/gecoris
  • on WINDOWS in command prompt:

setx gecoris_HOME C:\sw\gecoris /m
setx PYTHONPATH "%PYTHONPATH%;%gecoris_HOME%" /m
setx PATH "%PATH%;%gecoris_HOME%\gecoris" /m

Additional requirements