Created
March 24, 2020 22:58
-
-
Save Firefishy/0f55dd3c195ddf6480f2f3bffbd2da99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /path-to-dir/LUREF_NGL/; find . -type f -iname '*.tif' >input-files.txt | |
docker run -it --rm -v /path-to-dir/LUREF_NGL:/data osgeo/gdal:alpine-normal-v2.4.1 sh -l | |
(in docker) gdalbuildvrt -resolution highest -r nearest ANA_LUREF_NGL_DTM.vrt -input_file_list input-files.txt | |
# Rest not in docker... | |
gdaladdo -ro --config COMPRESS DEFLATE --config COMPRESS_OVERVIEW DEFLATE --config ZLEVEL 9 --config BIGTIFF_OVERVIEW IF_SAFER --config GDAL_TIFF_OVR_BLOCKSIZE 512 -r nearest ANA_LUREF_NGL_DTM.vrt 4 16 64 256 1024 4096 | |
gdaldem hillshade ANA_LUREF_NGL_DTM.vrt lu_hillshade_2017.tif -co BIGTIFF=YES -co TILED=YES -co COMPRESS=DEFLATE -co GDAL_NUM_THREADS=ALL_CPUS -of GTiff -b 1 -z 1.0 -s 0.5 -az 315.0 -alt 45.0 | |
gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL --config BIGTIFF_OVERVIEW IF_SAFER --config GDAL_TIFF_OVR_BLOCKSIZE 512 -r average lu_hillshade_2017.tif 4 16 64 256 1024 4096 | |
gdalwarp -t_srs epsg:3857 -r lanczos -multi -wo NUM_THREADS=ALL_CPUS ANA_LUREF_NGL_DTM.vrt ANA_LUREF_NGL_DTM-epsg-3857.tif | |
gdal_translate -co COMPRESS=DEFLATE -co TILED=YES -co ZLEVEL=9 -co NUM_THREADS=ALL_CPUS -co BIGTIFF=YES ANA_LUREF_NGL_DTM-epgs-3857.tif ANA_LUREF_NGL_DTM-epsg-3857-compress.tif | |
gdaladdo -ro --config COMPRESS_OVERVIEW DEFLATE --config BIGTIFF_OVERVIEW IF_SAFER --config GDAL_TIFF_OVR_BLOCKSIZE 512 -r average ANA_LUREF_NGL_DTM-epsg-3857-compress.tif 4 16 64 256 1024 4096 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment