About GeoUtils#
What is GeoUtils?#
GeoUtils1 is an open source Python package for geospatial analysis, aiming to improve scalability and interoperability with Python GIS packages.
GeoUtils can be seen primarily as an extension of Xarray and GeoPandas, adding higher-level analysis tools at the interface of rasters, vectors and point clouds, from operations such as transformations (e.g., reprojection, point gridding, polygonization) to more advanced statistics (e.g., grouped stats, spatial correlation estimation, random fields)2.
GeoUtils adds lazy, chunked execution with Dask for all raster and point cloud operations and some vector operations3. Operations rely directly on the Python statistical and geospatial stack (e.g., Rasterio, PyProj, SciPy, Numba, GSTools, SciKit-GStat, GPyTorch), with composable methods and backends that can be easily customized while GeoUtils handles georeferencing and chunked execution. Finally, GeoUtils strives to make these tools accessible through a shared interface across rasters, point clouds and vectors, with a structure following the principle of least astonishment for software development.
For example, a kriging interpolator can be reused for raster resampling, gap-filling or point gridding, and a weighted mean reducer for resampling, filtering or zonal statistics4. With kriging, we don’t reinvent the underlying mathematics, instead relying on existing geostatistical packages where relevant, and adding only specific logic to make the operations scalable on large data (out-of-memory pair sampling and reduction, covariance-aware chunking).
GeoUtils is designed for all Earth and planetary observation science, and generally most useful for quantitative analysis of large datasets.
Who is behind GeoUtils?#
GeoUtils was created by a group of researchers with expertise in geostatistics, GIS, and remote sensing of the cryosphere. Nowadays, its development is jointly led by researchers in geospatial analysis (including funding from NASA and SNSF) and engineers from CNES (French Space Agency).
Most contributors and users are scientists or industrials working in various fields of Earth observation5.
Things GeoUtils does for you under the hood#
GeoUtils does not only add scalability to existing features, but also adds modularity or optimization under-the-hood for more efficient geospatial analysis.
For example:
We add customizable NaN handling on top of existing filters and interpolators, to facilitate analysis with missing data6.
We interpolate large rasters much faster than Xarray’s interp() (based on SciPy’s rectilinear interpolation)
by simply relying on better-adapted equal-grid interpolation from map_coordinates().7
We support varied statistics on datasets larger than memory, building on Dask/Flox reductions8, but adding more direct support for subsampling, weights or zonal statistics from vectors, including fractional geometry-grid intersections.
We facilitate estimating spatial correlations by efficiently sampling pairs out-of-memory from large rasters or point clouds while equally representing all distances (as random samples on large data tend to rarely fall on two neighbouring points!). We also efficiently compute variography estimators on larger-than-memory spatial pairs, building on Dask/Flox as for the statistics above. During all of this, we reuse SciKit-GStat estimators and models to add the smallest layer necessary for scalability, and provide conversion to other covariance models (GSTools, GPyTorch) to facilitate interoperability.9.