--- id: gstools version: "1.7.0" license: LGPL-3.0 license_treatment: copyleft maintenance: active --- # gstools — GSTools: A geostatistical toolbox. License: copyleft · Maintenance: active · Downloads: 136.9K/mo ## What it is and what it does GSTools is a Python geostatistics library for modelling and simulating spatial phenomena. It implements kriging (simple, ordinary, universal, and external drift variants), random field generation via the randomisation method, variogram estimation and fitting, and support for user-defined covariance models. The library handles structured and unstructured spatial data in 1D, 2D, and 3D, with optional geographic coordinate support and VTK export for visualization. The package is built on numpy and scipy, with optional Cython acceleration via gstools-cython and MCMC sampling via emcee for parameter estimation. It targets researchers and practitioners in hydrogeology, geophysics, and environmental science who need to interpolate sparse measurements, generate ensemble field realizations, or analyse spatial structure through variograms. Conditioned field generation allows ensemble members to respect measurement constraints while capturing spatial uncertainty. Use it for: - Generate ensemble realizations of hydrogeological properties conditioned to well measurements for uncertainty quantification. - Estimate and fit variograms from scattered spatial data to characterize spatial correlation structure. - Interpolate sparse measurements using kriging to create continuous field estimates with uncertainty bounds. - Create synthetic spatial random fields with specified covariance structure for Monte Carlo simulation studies. - Export 3D spatial fields to VTK format for visualization in ParaView or analysis with PyVista. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. GSTools provides geostatistical tools for spatial random field generation, kriging, variogram estimation, and covariance modelling with support for structured and unstructured data in 1D, 2D, and 3D. Yes. GSTools is actively maintained, has no known vulnerabilities, supports current Python versions, and provides a comprehensive toolkit for geostatistical modelling. The LGPL-3.0 license is copyleft; ensure your use case permits derivative-work licensing. Install friction is low. It is well-suited for research, academic, and open-source projects requiring spatial statistics and field simulation. ## Install pip install gstools uv add gstools poetry add gstools ## Installing gstools Before you install: Low install friction with a pure-wheel distribution. Active maintenance with recent commits and a stable release cadence; supports Python 3.8 through 3.13. Runtime dependencies include scipy, numpy, and optional Cython acceleration via gstools-cython. License in practice: Licensed under LGPL-3.0 (copyleft). Derivative works and modifications must be released under the same license; proprietary use requires careful review of linking and distribution terms. Quickstart: import gstools as gs import numpy as np # Generate a 2D Gaussian random field model = gs.Gaussian(dim=2, var=1, len_scale=10) srf = gs.SRF(model) field = srf((range(100), range(100)), mesh_type='structured') Verify before relying: - Whether gstools-cython acceleration is automatically installed and used by default, or requires separate setup steps. - Performance characteristics and scalability limits for very large fields or high-dimensional problems. - Whether the package supports GPU acceleration or distributed computing beyond what emcee provides. ## Package facts - License: LGPL-3.0 (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 136.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags geostatistical random field generation, kriging interpolation spatial data, variogram estimation fitting, covariance models spatial statistics, conditioned random field simulation, spatial data analysis python, geostatistics toolkit, geostatistics, spatial-statistics, kriging [View on SkillFed](https://skillfed.io/packages/gstools) · [View on PyPI](https://pypi.org/project/gstools/)