Last active
October 21, 2020 10:19
-
-
Save oscarfonts/956a239f7c5579b4505b042ac912ed14 to your computer and use it in GitHub Desktop.
ECW to GeoTIFF conversion with ginetto/gdal
This file contains 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
FILENAME=Me1956 | |
# fetch image | |
docker pull ginetto/gdal:2.4.1_ECW | |
# convert ecw to geotiff | |
docker run --rm -it --name gdalecw -v $PWD:/home/datafolder ginetto/gdal:2.4.1_ECW \ | |
gdal_translate -co "TILED=YES" -co "COMPRESS=JPEG" -co "PHOTOMETRIC=YCBCR" -co "NUM_THREADS=ALL_CPUS" -co "BIGTIFF=YES" /home/datafolder/${FILENAME}.ecw /home/datafolder/${FILENAME}.tif | |
# add external overviews | |
docker run --rm -it --name gdalecw -v $PWD:/home/datafolder ginetto/gdal:2.4.1_ECW \ | |
gdaladdo -r average -ro -minsize 512 --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL --config GDAL_NUM_THREADS ALL_CPUS --config BIGTIFF_OVERVIEW YES /home/datafolder/${FILENAME}.tif | |
# gdalinfo | |
docker run --rm -it --name gdalecw -v $PWD:/home/datafolder ginetto/gdal:2.4.1_ECW \ | |
gdalinfo /home/datafolder/${FILENAME}.tif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment