Using OTB-Wrapping Windows binary package
The OTB-Wrapping binary package does not embed the dll needed to use the package properly. This section explains how to download the Dlls, how to setup the environment and how to use the Java wrapping and the Python wrapping.
Download the missing DLLs
First, the missing dlls can be downloaded using the OSGEO4W installer. (http://trac.osgeo.org/osgeo4w/). Click on gdal17 to get all the necessary libraries. This is for the missing libraries in the package.
Set up your environment
Setting up the environment would allow a correct use of the wrapping package. Since it needs the libraries that were missing before the last step, a java executable or a python script must be able to find them. It is necessary then to add the directory where they are located in the path.
- Add the OSGeo4W binary dir to the environment variable called PATH (C:\OSGeo4W\bin).
- Gdal use an environment variable GDAL_DATA which points to the directory where files needed for the projections are. Create a new environment variable GDAL_DATA and give it the value C:\OSGeo4W\apps\gdal17\share\gdal
Another (better) solution to set up the environment correctly, is to launch an OSGeo4W shell (shortcut can be found in Start Menu) and execute gdal17.bat inside it. The environment is then set up correctly in this shell (PATH and GDAL_DATA are correctly set). All the process must be run from this command prompt.
To use the java jars with eclipse, the safest way is to follow Solution 2. Lauching Eclipse from this shell will ensure the use of the right environment. All dlls should be found correctly when you run a program.
OTB-Wrapping has been built with python 2.7.1, but the python version available in OSGEO4W is currently 2.5.2. Waiting for a python upgrade in OSGeo4W, It is necesssary to download python 2.7 and use this version to launch the python scripts.
You can use the following installer : http://www.python.org/ftp/python/2.7.1/python-2.7.1.msi