1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| @echo off SET INFOLDER="tile_*.tif" SET YEAR=1999 SET OUTFOLDER=E:\mosaics SET OUTEPSG=2264 SET GDAL_NUM_THREADS=ALL_CPUS
ECHO Aerial Conversion ECHO ================== ECHO Folder: %FOLDER% ECHO Year: %YEAR% ECHO EPSG: %OUTEPSG% ECHO Started: %date% %time%
ECHO Building VRT... gdalbuildvrt %OUTFOLDER%\vrt\%YEAR%.vrt %INFOLDER%
ECHO Starting gdalwarp... gdalwarp -t_srs EPSG:%OUTEPSG% -overwrite -multi -wo NUM_THREADS=ALL_CPUS -co COMPRESS=JPEG -co JPEG_QUALITY=40 -co PHOTOMETRIC=YCBCR -co TILED=YES -co BIGTIFF=YES %OUTFOLDER%\vrt\%YEAR%.vrt %OUTFOLDER%\%OUTEPSG%\%YEAR%-tmp.tiff
ECHO Starting gdaladdo... gdaladdo -r average --config GDAL_NUM_THREADS 4 --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL %OUTFOLDER%\%OUTEPSG%\%YEAR%-tmp.tiff
ECHO Starting cogger... cogger -output %OUTFOLDER%\%OUTEPSG%\%YEAR%.tiff %OUTFOLDER%\%OUTEPSG%\%YEAR%-tmp.tiff
ECHO Cleaning up... del %OUTFOLDER%\%OUTEPSG%\%YEAR%-tmp.tiff
ECHO ==================== ECHO All done at %time%
|