#!/usr/bin/env bash 

###################################################################
#Author         : Joaquín M.C. Belart
#Email          : joaquin@lmi.is
###################################################################

imgzstd='-co compress=zstd -co tiled=yes -co bigtiff=yes -co blockxsize=1024 -co blockysize=1024 -co predictor=2 -co zstd_level=1 -co num_threads=32'
source ~/shgen/lasfunciones.sh
sp=/safn/gagnasafn/gagnasafn/fjarkonnun/spotmosaik/samsett_mynd/nat/utgafa4/spot5_2_5m_nat_utg4.img

main()
{
    gdal_retile.py -of GTiff $imgzstd -ps 10000 10000 -s_srs EPSG:3057 -ot Byte -targetDir . $sp 
}

main


#gdal_retile [--help] [--help-general]
#               [-v] [-co <NAME>=<VALUE>]... [-of <out_format>] [-ps <pixelWidth> <pixelHeight>]
#               [-overlap <val_in_pixel>]
#               [-ot  {Byte/Int8/Int16/UInt16/UInt32/Int32/Float32/Float64/
#                       CInt16/CInt32/CFloat32/CFloat64}]'
#               [ -tileIndex <tileIndexName> [-tileIndexField <tileIndexFieldName>]]
#               [-csv <fileName> [-csvDelim <delimiter>]]
#               [-s_srs <srs_def>]  [-pyramidOnly]
#               [-r {near|bilinear|cubic|cubicspline|lanczos}]
#               -levels <numberoflevels>
#               [-useDirForEachRow] [-resume]
#               -targetDir <TileDirectory> <input_file> <input_file>...
