geost.base.BoreholeCollection#
- class geost.base.BoreholeCollection(*args, **kwargs)[source]#
A collection combines header and borehole data and ensures that they remain aligned when applying methods.
- Parameters:
header (
PointHeader
) – Instance of a header class corresponding to the data.data (
LayeredData
) – Instance of a data object corresponding to the header.
- __init__(header: HeaderObject, data: DataObject)#
Methods
__init__
(header, data)add_header_column_to_data
(column_name)Add a column from the header to the data table.
change_horizontal_reference
(to_epsg)Change the horizontal reference (i.e. coordinate reference system, crs) of the collection to the given target crs.
change_vertical_reference
(to_epsg)Change the vertical reference of the collection object's surface levels
Two-way check to warn of any misalignment between the header and data attributes.
get
(selection_values[, column])Get a subset of a collection through a string or iterable of object id(s).
get_area_labels
(polygon_gdf, column_name[, ...])Find in which area (polygons) the point data locations fall.
get_cumulative_layer_thickness
(column, values)Get the cumulative thickness of layers where a column contains a specified search value or values.
get_layer_top
(column, values[, ...])Find the depth at which a specified layer first occurs.
Refresh the header based on the loaded data in case the header got messed up.
select_by_condition
(condition[, invert])Select from collection.data using a manual condition that results in a boolean mask.
select_by_depth
([top_min, top_max, end_min, ...])Select data from depth constraints.
select_by_length
([min_length, max_length])Select data from length constraints: e.g. all boreholes between 50 and 150 m long.
select_by_values
(column, selection_values[, how])Select data based on the presence of given values in a given column.
select_with_lines
(lines, buffer[, invert])Make a selection of the collection based on line geometries.
select_with_points
(points, buffer[, invert])Make a selection of the collection based on point geometries.
select_within_bbox
(xmin, ymin, xmax, ymax[, ...])Make a selection of the collection based on a bounding box.
select_within_polygons
(polygons[, buffer, ...])Make a selection of the collection based on polygon geometries.
slice_by_values
(column, selection_values[, ...])Slice rows from data based on matching condition.
slice_depth_interval
([upper_boundary, ...])Slice data based on given upper and lower boundaries.
to_csv
(outfile[, data_table])Export the data or header table to a csv file.
to_datafusiontools
(columns[, outfile, ...])Export all data to the core "Data" class of Deltares DataFusionTools.
to_geopackage
(outfile, **kwargs)Write header data to geopackage.
to_geoparquet
(outfile, **kwargs)Write header data to geoparquet.
to_kingdom
(outfile[, tdstart, vw, vs])Write data to 2 csv files: interval data and time-depth chart,
to_multiblock
(data_columns[, radius, ...])Create a Pyvista MultiBlock object from the data that can be used for 3D plotting and other spatial analyses.
to_parquet
(outfile[, data_table])Export the data or header table to a parquet file.
to_qgis3d
(outfile[, ...])Write data to geopackage file that can be directly loaded in the Qgis2threejs plugin.
to_shape
(outfile, **kwargs)Write header data to shapefile.
to_vtm
(outfile, data_columns[, radius, ...])Save data as VTM (Multiblock file, an XML VTK file pointing to multiple other VTK files) for viewing in external GUI software like ParaView or other VTK viewers.
Attributes
The collection's data.
Boolean indicating whether there are inclined objects within the collection
The collection's header.
Coordinate reference system represented by an instance of pyproj.crs.CRS.
Number of objects in the collection.
Vertical datum represented by an instance of pyproj.crs.CRS.