Howto: compile and install ossim in ubuntu edgy

Firstly, you should install some packages which is needed by the compile and installation, and you can see the dependency here.
ossim dependencies
0. Prepare
As I want to install ossim with qt4, so I do:

sudo aptitude install qt4-dev-tools libopenthreads-dev libopenthreads3 libopenscenegraph-dev libopenscenegraph3 libgdal1-1.3.1-dev

1. Get the latest code
then I check out the latest cvs code of ossim, from the instructuments of ossim.org website:

cd
mkdir -p ubuntu/ossim.org
cd ubuntu/ossim.org
cvs -d :pserver:anonymous@www.remotesensing.org:/cvs login
cvs -d :pserver:anonymous@www.remotesensing.org:/cvs co ossim libwms ossim_qt4

2. Compile and install ossim:
Before install ossim, you should install libgeotiff first, and you can see the installation here, as libgeotiff is not in the ubuntu repository, and it is a dependency for ossim installation.

cd ossim
./configure –prefix=/usr –with-libtiff=/usr/lib
make
cd ..
mv ossim ossim-1.6.6
cd ossim
checkinstall -D
sudo dpkg -i *.deb
cd ..
mv ossim-1.6.6 ossim

Changing the ossim directory’s name, is a trick for checkinstall.

3. Install libwms
libwms is a base libaray, which is needed by ossimPlanet, and as we want to install libwms in ubuntu system, some neccessary process is needed here.

cd libwms
nano Make/makedefs

We need to replace all /usr/local with /usr to suit our system in makedefs, and we can use ctrl+\ to replace all the string in nano.

make
checkinstall -D
sudo dpkg -i *.deb

4. Install ossimPlanet

This is another library, with an example application. So first replace all /usr/local/ with /usr in the Make/makedefs too.
if you can compile without error, then you can skip here. Add a line in ossimPlanet/src/ossimPlanet/GNUMakefile:

ossimPlanetDtedElevationDatabase.cpp \

and if it is exist there, do nothing.

make
checkinstall -D
sudo dpkg -i *.deb

Note: this deb package includes the header and lib files, but does not include the example ossimPlanetViewer!
So if you want to test the example program, you must specify the program’s path, and the default wms server is not working here. (I don’t know the reason.) But I can run it with the BluMarbEarth.tgz data.
and some operation key here:

1 Key Center of Interest = Center of Planet
2 Key Center of Interest = Surface of Planet
w Key Toggles wireframe mode
l key Toggles lighting
f key Toggles full screen mode (drag/drop not functional in full screen)
Space Bar resets to starting position
Left mouse drag Rotates the Planet
Right mouse drag Zoom in and out
Center mouse drag Moves Center of Interest on surface of Planet (mode 2 only)

I decide to write another weblog of this topic for compile and install ossim_qt4 and ossimPlanetQt, as I can compile these programs via a strange trick, but they are unstable now.


已发布

分类

来自

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注