[Qgis-developer] Sextante - OTB plugin and SAR data in Mac OS X

William Kyngesburye woklist at kyngchaos.com
Tue Aug 28 20:37:51 PDT 2012


Well, lots going on.  OTB linking was giving me problems (not well configured for OS X linking method) until I found the key.

First, as Julien said, FLTK in OTB is not needed in the QGIS plugin, so skip that.  All you should need is the OTB source.  All of the dependencies have internal versions, so we can force it to use my frameworks and leave everything else to the internal sources.

One big issue I found in this is with Apple's SDKs.  If you are on Lion+, Apple changed the SDKs starting with 10.7 SDK to remove the symlinks to /usr/local and /Library/Frameworks.  This means that linking/includes to these locations (custom SW in /usr/loca, my frameworks) will fail when using the 10.7 or 10.8 SDKs.  AND, if you don't specify an SDK in cmake, it defaults to the SDK matching the current system - there is no way to tell cmake to NOT use a SDK!

SO, I need to update the QGIS build notes, but if you are compiling on 10.6 Snow Leopard, you should have no problems.  If you are compiling on Lion+, you need to "fix" the SDKs.  Let me know and I'll spell that out.

Assuming Snow Leopard or a fixed Lion SDK:

Download the latest OTB source and unzip.

In the OTB source folder:

mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=MinSizeRel \
-D CMAKE_OSX_ARCHITECTURES="x86_64" \
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.6" \
-D CMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.6.sdk" \
-D OTB_WRAP_QT=OFF -D OTB_WRAP_JAVA=OFF -D OTB_WRAP_PYTHON=OFF \
-D BUILD_APPLICATIONS=ON -D OTB_USE_VISU_GUI=OFF \
-D TIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
-D GEOTIFF_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
-D JPEG_LIBRARY=/Library/Frameworks/UnixImageIO.framework \
-D USE_OPENMP=OFF \
-D CMAKE_INSTALL_NAME_DIR=/usr/local/lib/otb \
..

(match the deployment target and SDK version to your system version)

make

(since this is a big project, parallel compilation is good here.  add -j n, with n=number to match your number of processors*cores.  see the QGIS install doc for a more detailed description)

sudo make install


That should do it.


On Aug 27, 2012, at 10:26 PM, Noli Sicad wrote:

> Hi William,
> 
> Thanks for looking into this problem.
> 
> Hopefully you can make it easier for us (mac users) to have OTB and
> QGIS OTB plugin working in OS X.
> 
> I think mac os users need a Remote Sensing tools e.g. OTB and QGIS OTB
> python plugin.
> 
> Thanks.
> 
> Noli
> 


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.



More information about the Qgis-developer mailing list