Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
@ECHO OFF
SET runDir=%cd%
:: if provided directory
if "%~1"=="" (
    echo no folder given
) else (
    cd /d %1
    echo processing tiff files in %cd%
)
echo processing tiff files in %cd%
:: create \output folder if not present
IF NOT EXIST %cd%\output (
    mkdir output
)
:: set compression, tiles and colour space
for %%f in (*.tif) do (
    :: echo %cd%\%%f
    gdal_translate -expand rgb -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES "%cd%\%%f" "%cd%\output\%%f"
)
:: add overviews
cd output
for %%f in (*.tif) do (
    gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average "%cd%\%%f"  2 4 8 16
)
cd /d %runDir%

Creating a Web Mapping Service

Create a tileindex. This can be done in QGIS or command line.

...