zonal_stats.pbs 937 Bytes
#!/bin/sh
#PBS -N zonal_stats
#PBS -l select=1:ncpus=20:mem=110gb
#PBS -l walltime=20:00:00


. /work/OT/theia/oso/jordi/OTB/otb_superbuild/otb_superbuild-otb_develop-Release-install/config_otb_tf_py35.sh

TERLAB_DIR=/work/OT/theia/oso/shapes/TERLAB/
DPT=31
TERLAB_FILE=RPG_TERLAB_DEP${DPT}_2017
TERLAB_ZIP=$TERLAB_DIR/$TERLAB_FILE.7z
TERLAB_SHP=$TERLAB_DIR/SURFACES-2017-PARCELLES-GRAPHIQUES-CONSTATEES_0${DPT}_20180210.shp
MAASSP_DIR=/work/OT/theia/oso/jordi/maassp_data

7z x $TERLAB_ZIP -aoa -o$TERLAB_DIR
#otbcli_ZonalStatistics -in ${MAASSP_DIR}/tiles/T31TCJ/Sentinel2_ST_MASK.tif -inbv -1000 -inzone.vector.in $TERLAB_SHP -inzone.vector.reproject 1 -out.vector.filename ${MAASSP_DIR}/zonal_stats_mask.shp -ram 30000

otbcli_ZonalStatistics -in ${MAASSP_DIR}/tiles/T31TCJ/Sentinel2_ST_REFL.tif -inbv -1000 -inzone.vector.in $TERLAB_SHP -inzone.vector.reproject 1 -out.vector.filename ${MAASSP_DIR}/zonal_stats_refl.shp -ram 30000