gstlearn is the new cross-platform Geostatistics C++ library proposed by MINES Paris - PSL University. It offers to users all famous Geostatistical methodologies developed and/or invented by the Geostatistic Team of the Geosciences Research Center.
The name 'gstlearn' stands for several purposes:
gstlearn comes in various forms:
If you only want to use Python or R packages, you should switch to corresponding README:
See https://gstlearn.org for more details.
The gstlearn C++ library is the successor of the Geoslib C/C++ library which was proposed through the RGeostats R package.
The gstlearn C++ library is developed by the Geostatistics Group of the Geosciences Center (MINES Paris - PSL University - France)
The gstlearn C++ library :
See credits below.
When using the gstlearn C++ Library, please, use this to cite us in any publication or results for which gstlearn has been used:
You may be interested in the citation file gstlearn.bib
To report a bug or contact us:
This library has been successfully tested with Ubuntu 18/20/22 LTS, Windows 10 and MacOS 12/14 (see here). For compiling and installing gstlearn C++ library, the following tools must be available (See required tools installation instructions below):
See required tools installation instructions below
For getting the sources files, just clone the github repository:
Next time, you will only need to pull the repository (If you have some local undesirable modifications, you have to revert them and execute the pull, otherwise do not execute git reset
):
For compiling and installing the gstlearn C++ shared library, execute the following instructions from the root directory of gstlearn. Please note that you can choose another destination folder (currently named build).
...or any other single configuration compiler:
or even faster:
Notes:
...or any other multiple configurations compiler:
The check*
targets bring some required runtime customization, so do not use the standard ctest command for triggering the non-regression tests.
To build and launch non-regression tests, execute the following commands:
...or any other single configuration compiler:
or even faster:
...or any other multiple configurations compiler:
To clean (partially) the build, execute the following command:
Notes:
clean_all
target from the shortcut Makefile inside the top level directory:Please, look at tests C++ code in order to learn how to use the gstlearn C++ library. You can generate the source code documentation using Doxygen.
These tools are needed for compiling the gstlearn C++ library. Please note that HDF5 and Doxygen (and Latex) installation are optional.
If you modified your system, you must reinstall the requirements from scratch following next instructions. You must delete 'gstlearn' existing source folders (if so).
Note :
Install the dependencies:
Define environment variables for the appropriate clang compiler (adapt llvm installation path):
Notes:
CC
and CXX
environment variables, follow this guideThese requirements are also recommended to people who wants to compile gstlearn Python package. If you want to compile gstlearn R package under Windows, you should look at the next section.
Download and install the following tools using default options during installation:
C:\Program Files\doxygen
)Assume that you have cloned the Eigen3 GitLab repository in the following folder: C:\Eigen_src\eigen
. Open a command prompt by running cmd.exe
and execute the following commands (adapt the Eigen source code path in the first command and the Eigen version in the INSTALL_PREFIX below):
The Path environment variable (System variables) must be updated to make doxygen.exe available in the batch command line:
C:\Program Files\doxygen\bin
)These requirements are also recommended to people who wants to compile gstlearn R package. If you want to compile gstlearn Python package under Windows, you should look at the previous section. This is not the only way to install MinGW. But using MinGW provided with RTools permits us to also handle gstlearn R package compilation.
Remove all R and RTools previous installation and download and install the following tools using default options:
C:\Program Files\R\R-4.2.2
)C:\rtools42
)Notes:
The Path environment variable (System variables) must be updated to make R.exe available in the batch command line:
bin
directory from the R installation folder in the Path variable (ie: C:\Program Files\R\R-4.2.2\bin
)etc/pacman.conf
file in the RTools installation directory (ie: C:\rtools42
) by changing the SigLevel
variable to Never
(otherwise, git cannot be installed using pacman):mingw64.ini
file in the RTools installation directory (ie: C:\rtools42
) by un-commenting the following line (remove '#' character at the beginning):C:\rtools42
) and pin the icon to the task bar-DBUILD_DOXYGEN=ON
to the first cmake command above.-DCMAKE_INSTALL_PREFIX="path/of/gstlearn/install/dir"
to the first cmake command above.-DUSE_HDF5=ON
to the first cmake command above. If you use the shortcut Makefile, you can use USE_HDF5=1
after the make
command-G "MSYS Makefiles"
in the first cmake command above.-G "Visual Studio 16 2019"
in the first command (adapt version).Release
by Debug
above. If you use the shortcut Makefile, you can use DEBUG=1
after the make
command-DBoost_ROOT="path/to/boost"
-DEigen3_ROOT="path/to/eigen3"
-DHDF5_ROOT="path/to/hdf5"
-DDoxygen_ROOT="path/to/doxygen"
To uninstall all the installed files (only the files, not the directories), execute this command:
or faster:
The Doxygen HTML documentation is optional (not included in the installation by default). If you want to generate it, execute the command:
or faster (for Makefile user):
The documentation is then available by opening the following HTML file with your favorite web-browser:
The gstlearn C++ library is a derivative work based on the swigex0 project (see license in doc/licenses):
Name | License | URL | Copyright |
---|---|---|---|
swigex0 | MIT | https://github.com/fabien-ors/swigex0 | Copyright 2023, Fabien Ors |
The gstlearn C++ library depends on the following third-party source code, slightly modified and compiled in separate libraries (see [3rd-party](3rd-party) folder):
Name | License | URL | Copyright |
---|---|---|---|
csparse | LGPL v2.1 | https://people.math.sc.edu/Burkardt/c_src/csparse/csparse.html | Copyright 2006, Timothy A. Davis |
stripack (GMT) | LGPL v3 | https://www.generic-mapping-tools.org | Copyright(c) 2020, the GMT Team |
The gstlearn C++ library includes external source codes (see licenses notices in doc/licenses):
Name | License | URL | Copyright |
---|---|---|---|
clustering | Python License | http://bonsai.hgc.jp/~mdehoon/software/cluster | Copyright (C) 2002 Michiel Jan Laurens de Hoon |
fft | see licenses | https://netlib.org/go/fft-olesen.tar.gz | Copyright(c)1995,97 Mark Olesen |
ball | MIT | https://42.fr | Copyright(c) 2017 Eung Bum Lee |
sparseinv (SuiteSparse) | BSD 3-clause | http://www.suitesparse.com | Copyright 2011, Timothy A. Davis |
vtk (VisIt) | BSD 3-clause | https://visit.llnl.gov | Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC |
The gstlearn C++ library also depends on the following third-party libraries (see licenses notices in doc/licenses):
Name | License | URL | Copyright |
---|---|---|---|
Boost | see licenses | https://www.boost.org | see Boost headers |
Eigen3 | MPL2 | https://eigen.tuxfamily.org | see Eigen headers |
HDF5 | see licenses | https://www.hdfgroup.org | Copyright 2006 by The HDF Group |
The gstlearn C++ library comes with several data files that are used for our documentation (tutorials and courses).
Here are the credits and licenses for the different data files available in each directories of doc/data:
Name | License | URL | Copyright |
---|---|---|---|
Alluvial | Etalab v 2.0 | https://infoterre.brgm.fr | Copyright (C) Sept. 2021, BRGM |
benchmark | see (1) | http://www.ai-geostats.org | Copyright (C) 2003, Dubois, G., Malczewski, J. and De Cort, M. |
boundaries | N/A | https://www.naturalearthdata.com | Made with Natural Earth |
BRGM | see (2) | https://brgm.fr | Copyright (C) Sept. 2021, BRGM derived from Bardossy et al. 1999 |
Chamaya | CC BY 4.0 | https://gstlearn.org | Copyright (C) 2010, Renard, D. & Beucher, H. |
FKA | CC BY 4.0 | https://gstlearn.org | Copyright (C) 1999, Renard, D. |
halieutic | CC BY 4.0 | https://ices-library.figshare.com | Copyright (C) 2017, ICES see (3) |
Meshings | CC0 1.0 Univ. | https://www.cs.cmu.edu/~kmcrane | Copyright (C) 2020, Crane, Keenan and Pinkall, Ulrich and Schröder, Peter |
PluriGaussian | CC BY 4.0 | https://gstlearn.org | Copyright (C) 1999, Renard, D. |
Pollution | CC BY 4.0 | http://rgeostats.free.fr | Copyright (C) 2000, Team RGeostats |
Scotland | CC BY 4.0 | http://rgeostats.free.fr | Copyright (C) 2000, Team RGeostats |
Selectivity | CC BY 4.0 | https://gstlearn.org | Copyright (C) 2010, Freulon, X. |
(1) Reference: Dubois, G., Malczewski, J. and De Cort, M. (2003). Mapping radioactivity in the environment. Spatial Interpolation Comparison 1997 (Eds.). EUR 20667 EN, EC. 268 p.
(2) Bárdossy, A., H. Giese, J. Grimm-Strele, and K. Barufke (2003), SIMIK + GIS—Implementierte Interpolation von Grundwasserparametern mit Hilfe von Landnutzungs- und Geologiedaten. Hydrol. Wasserwirt., 47, 13–20.
(3) ICES. 2017. Handbook of Geostatistics in R for Fisheries and Marine Ecology. ICES COOPERATIVE RESEARCH REPORT. Vol. 338, 184 pp. https://doi.org/10.17895/ices.pub.3717
gstlearn C++ Library is distributed under the license:
BSD 3-clause
2024 Team gstlearn