Commit a59fd02b authored by Tristan Klempka's avatar Tristan Klempka
Browse files

DOC: add installation steps for LIS

parent b4f5fb70
......@@ -13,17 +13,18 @@ The input files are SPOT-4 or Landsat-8 Level-2A images from Theia Land and the
## Code Example
To build DEM data. Download VRT files corresponding to the data and build the .vrt using gdalbuildvrt. Edit config.json file to activate preprocessing : Set "preprocessing" to true and set vrt path. It will project and resample the SRTM DEM over the Landsat/SPOT area (30m:Landsat8 or 20m:Take5). It uses gdalwarp with the cubicspline option.
The snow detection is performed in the Python script app/S2Snow.py.
To build DEM data. Download VRT files corresponding to the data and build the .vrt using gdalbuildvrt. Edit config.json file to activate preprocessing : Set "preprocessing" to true and set vrt path. It will project and resample the SRTM DEM over the Landsat/SPOT area (30m:Landsat8 or 20m:Take5). It uses gdalwarp with the cubicspline option.
The snow detection is performed in the Python script app/run_snow_detector.py.
```
Configure PYTHONPATH environnement
export PYTHONPATH=${lis-build-dir}/bin/:$PYTHONPATH
export PYTHONPATH=${lis-build-dir}/app/:$PYTHONPATH
```
Run the main python script:
```
python s2snow.py param.json
python run_snow_detector param.json
```
There is a Bash script in app directory which allows to set the env variable and run the script:
......@@ -54,11 +55,45 @@ Python package dependencies: sys, subprocess, glob, os, json, gdal
### Installing from the source distribution
To configure OTB on venuscalc:
#### General
source /mnt/data/home/otbtest/config_otb.sh
Use cmake to configure your build.
Set
````
LIS_DATA_ROOT
````
For OTB superbuild users these cmake variables need to be set:
````
OTB_DIR
ITK_DIR
GDAL_INCLUDE_DIR
GDAL_LIBRARY
````
Set these environnement variables:
````
PATH=/OTB/install/folder/bin/
LD_LIBRARY_PATH=/OTB/install/folder/lib/:/let-it-snow/build/folder/bin/
````
Run make.
To install s2snow python module.
In your build folder:
````
cd python
python setup.py install
````
or
````
python setup.py install --user
````
let-it-snow is now installed.
### Then build the lis project using cmake
#### To configure OTB on venuscalc
````
source /mnt/data/home/otbtest/config_otb.sh
````
#### Then build the lis project using cmake
````
cd $build_dir
cmake -DCMAKE_CXX_FLAGS:STRING=-std=c++11 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-4.8 -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.8 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DGDAL_INCLUDE_DIR=/mnt/data/home/otbtest/OTB/SuperBuild/include -DGDAL_LIBRARY=/mnt/data/home/otbtest/OTB/SuperBuild/lib/libgdal.so $source_dir
......@@ -66,12 +101,13 @@ make
````
## Tests
Enable tests with BUILD_TESTING cmake option.
Download LIS-Data folder. It contains all the data needed to run tests. Set Data-LIS path var in cmake configuration files.
Baseline : Baseline data folder. It contains output files of S2Snow that have been reviewed and validated.
Data-Test : Test data folder needed to run tests. It contains Landsat, Take5 and SRTM data.
Output-Test : Temporary output tests folder.
Do not modify these folders.
Enable tests with BUILD_TESTING cmake option
## Contributors
......@@ -80,5 +116,4 @@ Manuel Grizonnet (CNES), Simon Gascoin (CNRS/CESBIO), Tristan Klempka (Stagiaire
## License
This is free software under the GPL v3 licence. See
http://www.gnu.org/licenses/gpl-3.0.html for details.
http://www.gnu.org/licenses/gpl-3.0.html for details.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment