Reading data#

GeoST offer various functions to read and parse data to GeoST objects. Generally speaking, data can either be loaded from (local) files or is requested from a service like the BRO REST-API. The raw data is then parsed to a GeoST data object such as a BoreholeCollection or CptCollection.

Supported subsurface data#

GeoST supports data coming from several data sources and file formats. The tables below list the currently supported data sources, associated reader functions and resulting GeoST objects.

Subsurface data#

By subsurface point data we mean layered data (e.g. boreholes) or discrete/measurement data (e.g. CPT, well logs) at a single x,y- or lat,lon-location (see Data structures for a more detailed description).

File format/data service

Read function

Returned GeoST object

Description

BHR-G

read_bhrg

BoreholeCollection

(BRO) Geological boreholes from xml

BHR-GT

read_bhrgt

BoreholeCollection

(BRO) Geotechnical boreholes from xml

BHR-GT-samples

read_bhrgt_samples

BoreholeCollection

(BRO) Geotechnical boreholes - grainsize samples from xml

BHR-P

read_bhrp

BoreholeCollection

(BRO) Pedological boreholes from xml

CPT

read_cpt read_gef_cpts

CptCollection

(BRO) Cone Penetration Tests from xml or gef

SFR

read_sfr

BoreholeCollection

(BRO) Pedological soilprofile descriptions from xml

BRO REST-API

bro_api_read

BoreholeCollection or CptCollection

BRO BHR-G, BHR-GT, BHR-GT-samples, BHR-P, CPT or SFR objects

GeoST borehole parquet or csv

read_borehole_table

BoreholeCollection or DataFrame

GeoST native format. Result of to_parquet or to_csv exports

GeoST CPT parquet or csv

read_cpt_table

CptCollection or DataFrame

GeoST native format. Result of to_parquet or to_csv exports

NLOG excel export

read_nlog_cores

BoreholeCollection or DataFrame

Reader for NLOG deep cores, see here

UU LLG cores

read_uullg_tables

BoreholeCollection or DataFrame

Reader for csv distribution of Utrecht University student boreholes

BORIS XML

read_xml_boris

BoreholeCollection or DataFrame

Reader for XML exports of the BORIS borehole description software

Subsurface model data#

By subsurface model data we mean voxel models (such as GeoTOP) or layer models (such as REGIS).

File format/data service

Read function

Returned GeoST object

Description

Generic Voxelmodel

VoxelModel

VoxelModel

Generic reader for a voxelmodel presented in NetCDF format (readable as xarray dataset)

Generic Voxelmodel OpenDAP

VoxelModel.from_opendap

VoxelModel

Generic reader for a voxelmodel from an OpenDAP server

GeoTOP NetCDF

GeoTop.from_netcdf

VoxelModel

Reader for GeoTOP NetCDF distribution

GeoTOP OpenDAP

GeoTop.from_opendap

VoxelModel

Reader for GeoTOP OpenDAP distribution

Data reading examples#

import geost

# Read a few BRO soil cores in a small area
boreholes = geost.bro_api_read("BHR-P", bbox=(141_470, 455_000, 141_700, 455_300))

print(type(boreholes))
boreholes.header
<class 'geost.base.BoreholeCollection'>
nr surface vertical_datum begin_depth end ghg glg landuse x y geometry
0 BHR000000085497 1.99 NAP 0.0 0.49 0.5 None graslandBlijvend 141670.998864 455121.998169 POINT (141670.999 455121.998)
1 BHR000000114014 2.05 NAP 0.0 0.55 0.5 None graslandBlijvend 141522.999044 455072.997521 POINT (141522.999 455072.998)
2 BHR000000120513 2.01 NAP 0.0 0.51 0.5 None graslandBlijvend 141579.998672 455166.997208 POINT (141579.999 455166.997)
3 BHR000000160549 2.03 NAP 0.0 0.53 0.6 None graslandBlijvend 141621.999280 455033.997319 POINT (141621.999 455033.997)
4 BHR000000206176 1.89 NAP 0.0 0.39 0.3 None graslandBlijvend 141521.998939 455274.997287 POINT (141521.999 455274.997)
5 BHR000000247842 2.12 NAP 0.0 0.62 0.4 None graslandBlijvend 141641.998690 455277.998008 POINT (141641.999 455277.998)
from geost.bro import GeoTop

# Get corresponding voxels of the GeoTOP model
geotop = GeoTop.from_opendap(bbox=(141_470, 455_000, 141_700, 455_300))

geotop
/home/runner/work/geost/geost/.pixi/envs/default/lib/python3.14/site-packages/pydap/handlers/dap.py:143: UserWarning: PyDAP was unable to determine the DAP protocol defaulting to DAP2. DAP2 is consider legacy and may result in slower responses. 
Consider replacing `http` in your `url` with either `dap2` or `dap4` to specify the DAP protocol (e.g. `dap2://<data_url>` or `dap4://<data_url>`).  For more 
information, go to https://www.opendap.org/faq-page.
  warnings.warn(
GeoTop
Data variables:
    strat    (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    lithok   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_1   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_2   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_3   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_4   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_5   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_6   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_7   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_8   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    kans_9   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    onz_lk   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
    onz_ls   (y, x, z) float32 25kB dask.array<chunksize=(5, 4, 76), meta=np.ndarray>
Dimensions: {'y': 5, 'x': 4, 'z': 313}
Resolution (y, x, z): (100.0, 100.0, 0.5)