{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Reading data\n", "GeoST offer various functions to read and parse data to GeoST data objects. Generally \n", "speaking, data can either be loaded from (local) files or is requested from a service\n", "like the BRO. The raw data is then parsed to a GeoST data object such as a\n", "[`BoreholeCollection`](../api_reference/borehole_collection.rst) or [`CptCollection`](../api_reference/cpt_collection.rst).\n", "\n", "## Supported subsurface data\n", "In the current state of this package there is a limited number of local file formats and\n", "services supported. The below tables are up-to-date with the currently supported data sources.\n", "\n", "### Subsurface point data\n", "By subsurface point data we mean layered data (e.g. boreholes) or discrete/measurement \n", "data (e.g. well logs) along the vertical axis (depth with respect to datum) at a single \n", "point (geographic lat/lon).\n", "\n", "| File format/data service | Read function | Returned GeoST object | Description |\n", "| ------------------------ | -------------- | --------------------- | ----------- | \n", "| GeoST borehole parquet or csv | [`read_borehole_table`](../api_reference/generated/geost.read_borehole_table.rst) | [`BoreholeCollection`](../api_reference/borehole_collection.rst) or [`LayeredData`](../api_reference/layered_data.rst) | GeoST native format. Result of to_parquet or to_csv exports. \n", "| GeoST CPT parquet or csv | [`read_cpt_table`](../api_reference/generated/geost.read_cpt_table.rst) | [`CptCollection`](../api_reference/cpt_collection.rst) or [`DiscreteData`](../api_reference/discrete_data.rst) | GeoST native format. Result of to_parquet or to_csv exports. |\n", "| NLOG excel export | [`read_nlog_cores`](../api_reference/generated/geost.read_nlog_cores.rst) | [`BoreholeCollection`](../api_reference/borehole_collection.rst) or [`LayeredData`](../api_reference/layered_data.rst) | Reader for NLOG deep cores, see [here](https://www.nlog.nl/boringen). |\n", "| UU LLG cores | [`read_uullg_tables`](../api_reference/generated/geost.read_uullg_tables.rst) | [`BoreholeCollection`](../api_reference/borehole_collection.rst) or [`LayeredData`](../api_reference/layered_data.rst) | Reader for csv distribution of Utrecht University student boreholes. |\n", "| BORIS XML | [`read_xml_boris`](../api_reference/generated/geost.read_xml_boris.rst) | [`BoreholeCollection`](../api_reference/borehole_collection.rst) or [`LayeredData`](../api_reference/layered_data.rst) | Reader for XML exports of the BORIS borehole description software. |\n", "| GEF CPTs | [`read_gef_cpts`](../api_reference/generated/geost.read_gef_cpts.rst) | [`CptCollection`](../api_reference/cpt_collection.rst) or [`DiscreteData`](../api_reference/discrete_data.rst) | Reader for GEF CPT files. |\n", "| BRO BHR-P | [`get_bro_objects_from_bbox`](../api_reference/generated/geost.get_bro_objects_from_bbox.rst) or [`get_bro_objects_from_geometry`](../api_reference/generated/geost.get_bro_objects_from_geometry.rst)| [`BoreholeCollection`](../api_reference/borehole_collection.rst) or [`LayeredData`](../api_reference/layered_data.rst) | BRO soil cores as distributed through the BRO |\n", "\n", "### Subsurface model data\n", "By subsurface model data we mean voxel models (such as GeoTOP) or layer models\n", "(such as REGIS).\n", "\n", "| File format/data service | Read function | Returned GeoST object | Description |\n", "| ------------------------ | -------------- | --------------------- | ----------- | \n", "| Generic Voxelmodel | [`VoxelModel`](../api_reference/generated/geost.models.VoxelModel.rst) | [`VoxelModel`](../api_reference/voxelmodel.rst) | Generic reader for a voxelmodel presented in NetCDF format (readable as xarray dataset) |\n", "| GeoTOP NetCDF | [`GeoTop.from_netcdf`](../api_reference/generated/geost.bro.GeoTop.from_netcdf.rst) | [`VoxelModel`](../api_reference/voxelmodel.rst) | Reader for GeoTOP NetCDF distribution |\n", "| GeoTOP OpenDAP| [`GeoTop.from_opendap`](../api_reference/generated/geost.bro.GeoTop.from_opendap.rst) | [`VoxelModel`](../api_reference/voxelmodel.rst) | Reader for GeoTOP OpenDAP distribution |\n", "\n", "## Data reading examples" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n" ] }, { "data": { "text/plain": [ "PointHeader instance containing 6 objects\n", " nr x y surface end geometry\n", "0 BHR000000085497 141671 455122 1.99 0.49 POINT (141671 455122)\n", "1 BHR000000114014 141523 455073 2.05 0.55 POINT (141523 455073)\n", "2 BHR000000120513 141580 455167 2.01 0.51 POINT (141580 455167)\n", "3 BHR000000160549 141622 455034 2.03 0.53 POINT (141622 455034)\n", "4 BHR000000206176 141522 455275 1.89 0.39 POINT (141522 455275)\n", "5 BHR000000247842 141642 455278 2.12 0.62 POINT (141642 455278)" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import geost\n", "\n", "# Read a few BRO soil cores in a small area\n", "boreholes = geost.get_bro_objects_from_bbox(\"BHR-P\", 141470, 141700, 455000, 455300)\n", "\n", "print(type(boreholes))\n", "boreholes.header" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "GeoTop\n", "Data variables:\n", " strat (y, x, z) float32 8kB ...\n", " lithok (y, x, z) float32 8kB ...\n", " kans_1 (y, x, z) float32 8kB ...\n", " kans_2 (y, x, z) float32 8kB ...\n", " kans_3 (y, x, z) float32 8kB ...\n", " kans_4 (y, x, z) float32 8kB ...\n", " kans_5 (y, x, z) float32 8kB ...\n", " kans_6 (y, x, z) float32 8kB ...\n", " kans_7 (y, x, z) float32 8kB ...\n", " kans_8 (y, x, z) float32 8kB ...\n", " kans_9 (y, x, z) float32 8kB ...\n", " onz_lk (y, x, z) float32 8kB ...\n", " onz_ls (y, x, z) float32 8kB ...\n", "Dimensions: {'x': 2, 'y': 3, 'z': 313}\n", "Resolution (y, x, z): (100.0, 100.0, 0.5)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from geost.bro import GeoTop\n", "\n", "# Get corresponding voxels of the GeoTOP model\n", "geotop = GeoTop.from_opendap(bbox=(141470, 455000, 141700, 455300))\n", "\n", "geotop" ] } ], "metadata": { "kernelspec": { "display_name": "default", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.7" } }, "nbformat": 4, "nbformat_minor": 2 }