[Qgis-developer] Directions to get mrsid support in GQIS (and other packages using gdal) on Ubuntu

Agustin Lobo alobolistas at gmail.com
Sun Jun 28 05:00:15 EDT 2009


Thanks to Alan Boudreault and the rest
of the ubuntugis team, and, of course, to the gdal team, we can add mrsid support
for QGIS that has been installed from binaries for ubuntu (from 8.04  to 9.04).
This support extends to other software relying on gdal, like package rgdal
for R.

An equivalent package exists for ecw support, I'll send directions for it
in few days.

We have tested these directions on several machines, but we cannot guarantee 
that you will not find other problems. Nevertheless, I do think this
is an small risk.

1. Include the ubuntugis unstable repository according to
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable

2. sudo apt-get install gdal-mrsid-src gdal-bin

3. Go to http://www.lizardtech.com/developer
login (or register if you have not done it yet)  and  only then you'll see
*Download SDKs*
<http://www.lizardtech.com/developer/members/license.php>
on the left panel. Select  *Download SDKs*
<http://www.lizardtech.com/developer/members/license.php>,
accept the agreement and select the appropriate
*GeoExpress SDK for Linux (x86)
(I think that you can use either the version **gcc 3.2 or*
*gcc 4.1 for ubuntu 8.04 - 9.04, but actually don't know for sure)*
(Micha and I have tested the version for  gcc 4.1)

In the following I assume that you copy the file to /usr/local (you'll need sudo cp)

4.  cd /usr/local
sudo gunzip Geo_DSDK-7.0.0.2167.linux.x86.gcc32.tar.gz
sudo tar -xf Geo_DSDK-7.0.0.2167.linux.x86.gcc32.tar

5. Now you use the gdal-mrsid-build that got made in step 2:
sudo /usr/bin/gdal-mrsid-build /usr/local/Geo_DSDK-7.0.0.2167
Copy  and paste the output to a txt file just in case.
Note that this process makes  /usr/lib/gdal16plugins/gdal_MrSID.so

6. Re-install grass   support if you had it for  previous versions of  gdal:
apt-get install libgdal1-1.6.0-grass

7. Check  the available formats:
gdalinfo --formats

If gdal-mrsid works, you'll see a long list of supported formats with MrSID 
listed near the
top. QGIS will be able to display sid images.



Note: in some machines we get
~$ gdalinfo --formats
ERROR 1: /usr/lib/gdal16plugins/gdal_MrSID.so: undefined symbol:
_ZNSs20_S_empty_rep_storageE
ERROR 1: /usr/lib/gdal16plugins/gdal_MrSID.so: undefined symbol:
_ZNSs20_S_empty_rep_storageE
Supported Formats:
   VRT (rw+): Virtual Raster
   GTiff (rw+): GeoTIFF
   NITF (rw+): National Imagery Transmission Format
etc

In this case, you'll also have an error for package rgdal in R:
  > require(rgdal)

Loading required package: rgdal
Error in fun(...) :
     GDAL Error 1: /usr/lib/gdal16plugins/gdal_MrSID.so: undefined
symbol: _ZNSs20_S_empty_rep_storageE

Error : .onLoad failed in 'loadNamespace' for 'rgdal'

but this error goes away just by deleting
/usr/lib/gdal16plugins/gdal_MrSID.so

Hope this helps!

Agus

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090628/075a0e5a/alobolistas.vcf


More information about the Qgis-developer mailing list