Lately, thanks to ma Master Thesis, I’ve been co-working on the Globe Plugin for QGis
here my install script for a threaded version of QGis with the Globe Plugin. By now the Globe has stereo 3D support, keyboard navigation (try all the num key), mouse navigation, a gui to control the globe and datasets can be inported configuring the .earth file. Today I’ll start implementing a dialog to add data without the need of the .earth file.
cheers Marco
UPDATE: the script is now updated to use the new mutex trunk branch and tested on ubuntu natty
UPDATE2: The script now uses the trunk repository of QGIS so it is actually not that usefull anymore since getting globe is just matter of compiling QGIS from source. I’ll leave it here for reference and “historic glory” 😉
UPDATE3: Globe runs on WIN https://www.opengis.ch/2011/08/02/qgis-globe-runs-on-win/
#!/bin/sh
#
set -e
#############################
#######CONFIGURE HERE########
#############################
ROOT_DIR=~/globe
SRC_DIR_NAME=qgis
SRC_DIR=$ROOT_DIR/$SRC_DIR_NAME
BUILD_DIR=$SRC_DIR/build
INSTALL_DIR=~/apps
GRASS_PREFIX=/usr/lib/grass64/lib
#
REPO='git://github.com/qgis/Quantum-GIS.git'
DEV_REPO='[email protected]:YOURREPO/Quantum-GIS.git'
#
#############################
#######END CONFIGURE#########
#############################
#
echo "Downloading src to: " $SRC_DIR
echo "Building src to: " $BUILD_DIR
echo "Installing to: " $INSTALL_DIR
#
CONTINUE=n
echo "OK? [y, n*]:"
read CONTINUE
CONTINUE=$(echo $CONTINUE | tr "[:lower:]" "[:upper:]")
if [ "$CONTINUE" = "Y" ]; then
continue
else
echo "Abort"
exit
fi
#
#add qgis repo needed to satisfy all dependences, we only compile qgis
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable/
sudo apt-get update
sudo apt-get build-dep qgis
sudo apt-get install cmake-curses-gui cmake-qt-gui gdal-bin libgdal1-1.8.0-grass txt2tags python-gdal git osgearth osgearth-dev openscenegraph
#
#get the source
mkdir -p $ROOT_DIR
cd $ROOT_DIR
#
DEV=n
echo "Do you have write acces to the repo (have SSH key to it)? [y, n*]:"
read DEV
DEV=$(echo $DEV | tr "[:lower:]" "[:upper:]")
if [ "$DEV" = "Y" ]; then
echo "cloning $DEV_REPO"
git clone $DEV_REPO $SRC_DIR_NAME
else
echo "cloning $REPO"
git clone $REPO $SRC_DIR_NAME
fi
#
cd $SRC_DIR
git checkout master
#
mkdir -p $INSTALL_DIR
mkdir -p $BUILD_DIR
cd $BUILD_DIR
ccmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DGRASS_PREFIX=$GRASS_PREFIX -DCMAKE_BUILD_TYPE=Release -DWITH_GLOBE=ON ..
#
#detect cpu cores
CORES=$(cat /proc/cpuinfo | grep processor | wc -l)
make -j$CORES install
#
#run qgis
#In some case you might need this 2 lines:
#see https://code.google.com/p/modwsgi/wiki/InstallationIssues for details
#LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libutil.so #use locate libutil to find the path
#export LD_PRELOAD
$INSTALL_DIR/bin/qgis


40 Comments

Rems · 2011-03-17 at 16:17

How to install sourcepole-qgis-2b685a2.zip on QGIS 1.6 Ubuntu 10.04 and how to use Marco Bernasocchi script above?
Thank you in advance.

    marco · 2011-03-17 at 18:05

    just copy the script to a text file, configure the first lines, save it as .sh file, mark it as executable (chmod u+x filename.sh or in properties dialog) and execute it. no need to use the zip file.
    ciao
    Marco

Rems · 2011-03-22 at 17:39

Thanks a lot, Marko.

Rems · 2011-03-22 at 18:53

But, how configure the first lines script’s?
And where past the Marco’s executable globe.sh?
Do you have a video tutorial, please Marco?

marco · 2011-03-22 at 19:01

no video yet sorry, to configure the first lines just edit the file before running it. if youjust run it like that it will run with the configuration it has now, theese are only preferences settings.
then just run qgis and enable the plugin.

Rems · 2011-03-22 at 21:51

Where paste the script and what to call it?
In phyton plugins? or usr/lib/qgis/plugins/.so?

marco · 2011-03-22 at 21:58

doesn’t matter, on your /home or desktop is ok

Rems · 2011-03-22 at 21:59

I run the scrit with the terminal for:
Downloading src to: /home/username/globe/qgis
Building src to: /home/username/globe/qgis/build
Installing to: /home/username/apps
OK? [y, n*]:
I validate, but nothing in QGIS 1.6 extensions.
How to install plugin Globe in Quantum Gis and Q-Rap?

Rems · 2011-03-22 at 22:02

Thank you a thousand times, Marco.

marco · 2011-03-22 at 22:19

Hi Rems, to validate you actually have to enter y. it will then ask you more questions.
then not in qgis 1.6, but in the newly compiled version at ~/apps/bin/qgis

Rems · 2011-03-22 at 22:33

How?

marco · 2011-03-22 at 22:34

after the script ends it actually already starts it for you. if not just do ~/apps/bin/qgis from terminal

Rems · 2011-03-22 at 22:39

where is
~/apps/bin/qgis
in UBUNTU 10.04?

marco · 2011-03-22 at 22:39

yes

marco · 2011-03-22 at 22:40

open terminal and type the line.
~ is your home /home/yourusername/apps/bin/qgis

Rems · 2011-03-22 at 22:41

bash: /home/rems/apps/bin/qgis: Aucun fichier ou dossier de ce type

marco · 2011-03-22 at 22:44

probably the script did not run completly… did you get the souce code in /home/remd/globe (or whatever you configured)?

Rems · 2011-03-22 at 22:46

the terminal says:
No file or folder of this type.

Rems · 2011-03-22 at 22:47

quite.

Rems · 2011-03-22 at 22:51

configured? I just registered. sh and I started with the terminal, then y. then a partial installation.

marco · 2011-03-22 at 22:55

mmm run the script and copy the full output

Rems · 2011-03-22 at 23:09

I use gedit I copy and paste your script then I record “globe.sh ‘in
/ home / rem lines of script are colored then I check in permissions allow executing the file as a program.
I run it in terminal I validate y. it runs ok and then partially closes the terminal.
Sorry I’m not ready and I like the free movement.

Rems · 2011-03-25 at 12:02

E: Could not find a source package for Qgis

Harald · 2011-05-12 at 08:06

Hi,
first of sll: thanks a lot for this script.
Are there any experiences in installing this for QGIS 1.6 on OS X? I tried this, but the script stopped with the error messages:
— start —
sudo: add-apt-repository: command not found
MacBook-Pro:globe meinmacbookpro$ sudo apt-get update
Password:
sudo: apt-get: command not found
MacBook-Pro:globe meinmacbookpro$
— end —
I found that these commands would be available for OS X it I install fink. I did this, everything with fink seems to be okay. But tose error messages still occur… :-((
Any hint would be very appreciated. Thanks a lot for this.
Harald
sudo: add-apt-repository

marco · 2011-05-13 at 23:53

Harald, I don’t know a lot about mac. but https://www.qgis.org/wiki/Building_QGIS_from_Source#MacOS_X:_building_using_frameworks_and_Cmake might be a good starting point to learn how to build QGis from source. Then just git clone this repo: https://github.com/mbernasocchi/Quantum-GIS/tree/mutex-globe and compile it. hope it helps.
ciao Marco

Harald · 2011-05-15 at 11:13

Hi Marco,
thanks a lot for your information. I will have a look on those links and will try my best…
Ciao Harald

Fred · 2011-05-29 at 19:48

Hi, Marco, I was expecting for Globe, thank you VERY MUCH for your script qgis_globe_install.sh, but I’ve a problem when trying to install globe with your script!!!!!!!!!
Help, I’m stupid Always the same error with 4 computers 32b, 64b, Natty, Maverick, in local, in root…
The build stops at 46/47% :
“Linking CXX shared library libqgis_gui.so [ 46%] Built target qgis_gui
make: *** [all] Erreur 2”
Regards

    marco · 2011-05-29 at 20:59

    Salut Fred,
    The report you give is not super verbose. The error probably happened earlyer, scroll up in the terminal and look for the error. Furthermore try to re launch the make step:
    cd builDir
    make ..
    Hope it helps

murari · 2011-07-30 at 03:55

sir,
i am using QGIS 1.7.0,in windows environment please guide me how to use this QGis Globe Plugin, i am not so much aware of q gis, as i can see this will be useful for my project for studying far reached villages in NE indian mountains.
i case you have something directly loadable plugin ple send it on mail
murari

    marco · 2011-07-30 at 17:57

    Hi, i know that the packages for win are being worked on but dont know dthe current status. I ll inform myself and let you know. In case you are familiar with irc, Ask on #qgis to jef

murari · 2011-08-02 at 02:05

no luck…..
murari

marco · 2011-08-02 at 12:23

hey murari, I just asked Jef, he says that globe builds correctly for win. you should be able to get it by installing the OSGeo4W packages from https://www.qgis.org/wiki/Download#OSGeo4W_Installer
please let me know how it works out for you 🙂

marco · 2011-08-02 at 14:00

see my post https://www.opengis.ch/2011/08/02/qgis-globe-runs-on-win/

murari · 2011-08-11 at 03:00

sir,
i have a SRTM DEM file i am finding difficulty to load 3d dem on the globe. please help (urgent)
thanks

Riccardo · 2011-09-03 at 13:28

Cannot install. It seems that osgearth-dev has stopped to the rel 2.0-3natty1 and the next release has been renamed to libosgearth-dev
Non so come uscirne… 😐

    marco · 2011-09-03 at 18:59

    it is in qsis master now, dont use this intaller anymore.

Riccardo · 2011-09-04 at 09:26

any suggestion on how to start using this?

Riccardo · 2011-09-04 at 11:10

osgearth-dev should be installed, by the way… whichever way you install the plugin, and it cannot be installed 😐 since it does not exist anymore on the repos…

QGIS goes 3D with the OsgEarth Plugin « Free and Open Source GIS Ramblings · 2010-12-01 at 14:25

[…] you want to install Globe plugin, you can use Marco Bernasocchi’s install script. Thanks […]

QGIS goes 3D with the OsgEarth Globe Plugin « Free and Open Source GIS Ramblings · 2010-12-01 at 14:35

[…] install Globe plugin, you can use Marco Bernasocchi’s install script. Thanks […]

Leave a Reply to murariCancel reply