Forked from Firefishy/gist:0f55dd3c195ddf6480f2f3bffbd2da99
Last active
May 30, 2020 11:14
-
-
Save DavidMoraisFerreira/1600470627096a4a427a5d71f5092209 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 -a_srs "EPSG:2169" 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 | |
#Hillshade | |
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 | |
gdalwarp -t_srs epsg:3857 -r lanczos -multi -wo NUM_THREADS=ALL_CPUS lu_hillshade_2017.tif lu_hillshade_2017-epsg-3857.tif | |
gdal_translate -co COMPRESS=DEFLATE -co TILED=YES -co ZLEVEL=9 -co NUM_THREADS=ALL_CPUS -co BIGTIFF=YES lu_hillshade_2017-epsg-3857.tif lu_hillshade_2017-epsg-3857-compress.tif | |
gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config INTERLEAVE_OVERVIEW PIXEL --config BIGTIFF_OVERVIEW IF_SAFER --config GDAL_TIFF_OVR_BLOCKSIZE 512 -r average lu_hillshade_2017-epsg-3857-compress.tif 4 16 64 256 1024 4096 | |
#DTM | |
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-epsg-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 | |
#Color-relief | |
gdaldem color-relief ANA_LUREF_NGL_DTM.vrt color_ramp.txt lu_color_relief.tif | |
gdalwarp -t_srs "EPSG:3857" -r lanczos -multi -wo NUM_THREADS=ALL_CPUS lu_color_relief.tif lu_color_relief-epsg3857.tif | |
gdal_translate -co COMPRESS=DEFLATE -co TILED=YES -co ZLEVEL=9 -co NUM_THREADS=ALL_CPUS -co BIGTIFF=YES lu_color_relief-epsg3857.tif lu_color_relief-epsg3857-compress.tif | |
gdaladdo -ro --config COMPRESS_OVERVIEW DEFLATE --config BIGTIFF_OVERVIEW IF_SAFER --config GDAL_TIFF_OVR_BLOCKSIZE 512 -r average lu_color_relief-epsg3857-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