Skip to content

Rasterio with MrSID Support on OS X

Sean Gillies edited this page Dec 12, 2016 · 1 revision

Building Rasterio with MrSID Support on OS X

Get the MrSID SDK

  1. Join Developer Program: https://www.lizardtech.com/developer/overview.
  2. Login and agree to license https://www.lizardtech.com/developer/portal-sdk.
  3. Download Clang 7.0 (Universal) SDK.
  4. Extract to ~/src/, so that you have something like ~/src/MrSID_DSDK-9.5.1.4427-darwin15.universal.clang70.
  5. cd to ~/sw/MrSID_DSDK-9.5.1.4427-darwin15.universal.clang70/Raster_DSDK/lib/ and move all the libgeos* files to a new geos subdirectory.

Download and install GDAL

$ cd ~/src
$ wget http://download.osgeo.org/gdal/2.1.2/gdal-2.1.2.tar.gz
$ tar xzf gdal-2.1.2.tar.gz
$ cd gdal-2.1.2
$ prefix=~/gdal212/local
$ ./configure --prefix=$prefix --with-mrsid=/Users/sean/sw/MrSID_DSDK-9.5.1.4427-darwin15.universal.clang70/Raster_DSDK/
$ make -j8
$ make install

Install Rasterio

$ virtualenv -p python3.5 mrsid
$ source mrsid/bin/activate
(mrsid)$ pip install numpy cython
(mrsid)$ GDAL_CONFIG=~/gdal2.1/local/bin/gdal-config pip install rasterio[s3]==1.0a4 --no-binary rasterio

Running rio with MrSID

(mrsid)$ export DYLD_LIBRARY_PATH=/Users/sean/sw/MrSID_DSDK-9.5.1.4427-darwin15.universal.clang70/Raster_DSDK/lib
(mrsid)$ rio info example.sid