Environment
This article applies to GeoExpress on Mac OS and Ubuntu
Resolution
Mac OS:
1. Download http://www.kyngchaos.com/files/software/frameworks/GDAL-MrSID_Plugin-1.11.4-1.dmg and follow the instructions in the readme.rtf file to enable MrSID in QGIS. You can download the SDK compatible with your OS here:
- Mac 10.10: https://bin.us.lizardtech.com/download/developer/MrSID_DSDK-9.5.1.4427-ios70.universal.clang60.tar.gz
- Mac 10.11: http://bin.extensis.com/download/developer/MrSID_DSDK-9.5.4.4709-darwin15.universal.clang70.tar.gz
- Mac 10.12: http://bin.extensis.com/download/developer/MrSID_DSDK-9.5.4.4709-darwin16.universal.clang80.tar.gz
Unbuntu:
These instructions require admin privileges on your machine as they will make machine-wide changes.
1. Download the latest version of the DSDK for Linux from https://www.extensis.com/support/developers. For this article we will be using MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc531.tar.gz. If your downloaded filename is different (i.e. a newer version), remember that name because we will have to substitute it into commands later on.
2. Extract the downloaded DSDK into /opt
sudo tar -zxvf MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531.tar.gz -C /opt
Building GDAL with MrSID driver
1. Make a "src" directory in the home directory.
cd ~
mkdir src
cd src
2. Download the gdal sources from the Ubuntu repository. You will need to enable source repositories if you haven't already (open "Software and Updates" -> check Source Code).
sudo apt-get update
apt source gdal-bin
3. Now cd into the directory that apt source made for you, this may be slightly different as Ubuntu packages are frequently upgraded.
cd gdal-1.11.3+dfsg/
4. Run the configure script, telling it the location to which you extracted the DSDK.
./configure --with-mrsid=/opt/MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531/Raster_DSDK --with-mrsid_lidar=/opt/MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531/Lidar_DSDK --with-jp2mrsid=yes
5. Run make to build gdal. Optionally, add -j 8 to build on 8 threads which will make building much faster.
make -j 8
6. Run make install, which will install gdal binaries and libraries to /usr/local/bin and /usr/local/lib respectively.
sudo make install
7. Add gdal libraries, and LT DSDK libraries to your system-wide environment variable, LD_LIBRARY_PATH, by appending the following to /etc/environment:
LD_LIBRARY_PATH=/opt/MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531/Raster_DSDK/lib:/opt/MrSID_DSDK-9.5.4.4709-rhel6.x86-64.gcc531/Lidar_DSDK/lib:/usr/local/lib
Log out, and log back in for the environment changes to take effect.
Verify that gdal built successfully and has MrSID capabilities
1. gdalinfo --formats | grep -i sid
2. Launch QGIS and open any .sid file.