SGeMS is a software for 3D geostatistical modeling. It implements many of the classical geostatistics algorithms, as well as new developments made at the SCRF lab, Stanford University.
SGeMS relies on the Geostatistics Template Library (GsTL) to implement its geostatistical routines, including:
* Multi-variate kriging (co-kriging)
* Sequential Gaussian simulation
* Sequential indicator simulation
* Multi-variate sequential Gaussian and indicator simulation
* Multiple-point statistics simulation
For news, tutorials, and an FAQ, visit the SGeMS wiki.
* Comprehensive geostatistical toolbox
* Standard data analysis tools: histogram, QQ-plots, variograms,…
* interactive 3D visualization
* Scripting capabilities: SGeMS embeds the Python scripting language, that allows to automatically perform several (repetitive) actions.
* Use of plug-ins to add new geostatistics algorithms, support new file formats, or increase the set of script commands.
Where do i start? ..OK so i happen to be a Linux SysAdmin for some school. we use Linux on all our workstations including the laptops we gave to the students. so when i prof said he need a program called SGeMS for his class, it my job to get it done 🙁 i searched synaptic and that came with nothing (hmm sign of trouble) a little search on google took me to where i could download the source code. i downloaded it. checked the readme to see what is needs .. that was when i knew i was in for some serious ish. cut the long story short i went through hell just to get the program to compile. but i the end i did. so i decided i no man should ever go through what i went through and i decided to document how i got SGeMS to install on ubuntu..
the following guide involve the use of command line, although i try to make it as simple as possible so you shouldn’t have any problem. .. remember i said shouldn’t
first we download sgems from here http://sourceforge.net/projects/sgems/
for this guide am using version 2.0
once the source code is downloaded.. we now have to install the dependencies it needs to compile which are
– GsTL (Geostatistics Template Library)
– Qt (GUI library) version 3.1 or higher
– Coin3D (OpenIventor library), version 2.x
– SoQt (Qt bindings for OpenIventor), version 1.x
– SimVoleon (Volume rendering extension for Coin3D), version 2.x
qt , coin,python and SoQt can all be installed from the ubuntu repositories
Qt when i tried searching for qt in synaptic .. billions of files came up out of the lot i installed
libqt3-mt-dev qt3-assistant qt3-qtconfig
and it seem to work fine (guess am lucky)
Coin3D for coin i installed libcoin40-dev libcoin40-runtime
SoQt i installed libsoqt-dev
Python i installed python2.4-dev
you can always open synaptic /System/Admin/Synaptic and search for libqt3-mt-dev libcoin40-dev libcoin40-runtime qt3-assistant qt3-qtconfig python2.4-dev libsoqt-dev
better still you can install everything at a go via terminal /Applications/Accessories/Terminal
install with this command (copy and paste is allowed 🙂 )
sudo aptitude install libqt3-mt-dev libcoin40-dev libcoin40-runtime qt3-assistant qt3-qtconfig python2.4-dev libsoqt-dev
Now we have installed all the dependencies that can be gotten from the ubuntu repositories
time to install other dependencies
for some reasons downloading and compiling SimVoleon from here http://www.coin3d.org/lib/simvoleon threw up some funky errors about gcc .. anyway i went round that by downloading the latest version from subversion
Note: to use subversion you need to have it installed .. it can be easily installed by
sudo aptitude install subversion or search and install from synaptic.
now to download simvoleon we do the following
create a directory called svn in your home directory
move into the directory
next we run the command that would download simvoleon from svn
svn co https://svn.coin3d.org/repos/SIMVoleon/trunk SIMVoleon
give it some time.. you would see a prompt asking you to accept a certificate or some stuff like that .. you can choose to accept temporarily or permanently just don’t reject it 🙂
once simvoleon is downloaded you will find it under svn/ directory you created earlier .. now we need to go into the directory so we can compile it.
N.B before compiling any source code on ubuntu you need to install build-essentials meta-package which contains all tools needed for compilations mainly the GNU C compiler gcc
sudo aptitude install build-essential ; cd $HOME/svn/SIMVoleon
the above command install the build-essential package and moves us into the SIMVoleon directory next we run
lastly we run
sudo make install
the last command would install SIMvoleon .. i didnt experience any error when i went about it this way.
now to download the last dependencies
GsTL can be download here http://sourceforge.net/projects/gstl/
we don’t need to compile GsTL just place it in the same directory that you would like to install SGeMS.
so place both SGeMS-2.0.tgz and GsTL-1.3.tgz in your home directory and we extract it using the tar command
tar xzvf SGeMS* ; tar xzvf GsTL*
now we enter into the SGeMS Directory to make some pre-compile preparations
we need to edit a hidden config file named .qmake.cache we would edit this point the variables to the correct location on your computer
look for the following lines and
GSTLHOME = /tmp/Linux/GsTL-1.2.1
GSTLAPPLI_HOME = /tmp/Linux/SGeMS-1.4.1
edit them to look like this (we would point the location of GSTL and SGeMS if you followed the guide then there should be in your home directory so you edit them accordingly)
GSTLHOME = /home/bigbrovar/GsTL-1.3
GSTLAPPLI_HOME = /home/bigbrovar/SGeMS-2.0
save the text editor and close
now we need to edit you .bashrc file to include the paths necessarily for SGeMS to work
now we add the following to the bottom of the text file
now save and close
once this is done we now need to compile SGeMS (about time right) so we move into the SGeMS directory
sudo make install
now the last thing we need to don is direct Qt to libGsTLwidgets.so which can be found under the SGeMS directory
so run this in terminal
go to Library Paths and browse to this path under the SGeMS directory /plugins/designer/ click add save and close
now lets see if all the hard work paid up .. to run the program do this
you can write a script that starts it
open a test file and paste the following into it
save it as sgems and move it to /usr/local/bin (remember you have to do that has root)
sudo mv sgems /usr/local/bin
make it executible
chmod +x /usr/local/bin/sgems
so now when you want to start sgems .. just open your terminal and type sgems ..
i Hope this helps some one .
If this works for your please let me know.
Thanks to Ting Li from the SGeMS mailing list for the tips he gave me without which i would still be hitting my head at the wall in frustration.