-
-
Save davidraleigh/cf6efcecead5442f808878a22f690885 to your computer and use it in GitHub Desktop.
Install GDAL 2.3 with ECW support on Ubuntu 18.04
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
#!/bin/bash | |
## | |
## Tested on: Ubuntu 18.04 & ECW 5.4 & GDAL 2.3.1 | |
## | |
## Download the ERDAS ECW JP2 SDK v5.4 Linux | |
## https://download.hexagongeospatial.com/downloads/ecw/erdas-ecw-jp2-sdk-v5-4-linux | |
## Download GDAL v2.3 Source (ex. 2.3.1) | |
## http://trac.osgeo.org/gdal/wiki/DownloadSource | |
## First remove gdal if it's already installed | |
sudo apt remove gdal-bin | |
sudo apt autoremove | |
## Unzip ECW libraries and install. | |
## At the menu, select 1 for "Desktop Read-Only Redistributable" | |
unzip erdas-ecw-sdk-5.4.0-linux.zip | |
chmod +x ERDAS_ECWJP2_SDK-5.3.0.bin | |
./ERDAS_ECWJP2_SDK-5.3.0.bin | |
## Copy new libraries to system folder | |
## Rename the newabi library as x64 and move necessary libraries to /usr/local/lib | |
sudo cp -r ~/hexagon/ERDAS-ECW_JPEG_2000_SDK-5.4.0/Desktop_Read-Only /usr/local/hexagon | |
sudo mv /usr/local/hexagon/lib/x64 /usr/local/hexagon/lib/x99 | |
sudo mv /usr/local/hexagon/lib/newabi/x64 /usr/local/hexagon/lib/x64 | |
sudo cp /usr/local/hexagon/lib/x64/release/libNCSEcw* /usr/local/lib | |
sudo ldconfig /usr/local/hexagon | |
## Build GDAL with ECW support | |
unzip gdal-2.3.1.zip | |
cd gdal-2.3.1 | |
./configure --with-ecw=/usr/local/hexagon | |
make clean | |
make | |
sudo make install | |
## Check if it works | |
gdalinfo --formats | grep ECW | |
echo "SKO BUFFS!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment