gemgis.visualization.create_boreholes_3d#

gemgis.visualization.create_boreholes_3d(df: pandas.core.frame.DataFrame, min_length: Union[float, int], color_dict: dict, radius: Union[float, int] = 10) Tuple[List[pyvista.core.pointset.PolyData], pyvista.core.pointset.PolyData, List[pandas.core.frame.DataFrame]]#

Plotting boreholes in 3D

Parameters
  • df (pd.DataFrame) – DataFrame containing the extracted borehole data

  • min_length (Union[float, int]) – Value defining the minimum depth of boreholes to be plotted, e.g. min_length=1000

  • color_dict (dict) – Dict containing the surface colors of the model

  • radius (Union[float, int]) – Values of the radius of the boreholes plotted with PyVista, e.g. radius=100, default is 10

Returns

  • tubes (List[pv.core.pointset.PolyData]) – List of PyVista tubes

  • labels (pv.core.pointset.PolyData) – PyVista PolyData with Borehole Labels

  • df_groups (List[pd.DataFrame]) – List containing DataFrames

Example

>>> # Loading Libraries and File
>>> import gemgis as gg
>>> import pandas as pd
>>> df = pd.read_csv('file.csv')
>>> df
    Unnamed: 0  Index   Name                            X           Y           Z       Altitude    Depth   formation       geometry
0   2091        GD1017  ForschungsbohrungMünsterland1   32386176.36 5763283.15  27.00   107.00      5956.00 OberCampanium   POINT (32386176.36 5763283.15)
1   2092        GD1017  ForschungsbohrungMünsterland1   32386176.36 5763283.15  -193.00 107.00      5956.00 UnterCampanium  POINT (32386176.36 5763283.15)
>>> # Creating tubes
>>> tubes, labels, df_groups = gg.visualization.create_boreholes_3d(df=df, min_length=10, color_dict=color_dict, radius=1000)
>>> tubes
Information
MultiBlock  Values
N Blocks    2
X Bounds    32385176.360, 32404939.830
Y Bounds    5751889.550, 5764283.150
Z Bounds    -5849.000, 107.000
Blocks
Index   Name        Type
0       Block-00    PolyData
1       Block-01    PolyData
>>> # Inspecting labels
>>> labels
        Header
PolyData    Information
N Cells     2
N Points    2
X Bounds    3.239e+07, 3.240e+07
Y Bounds    5.753e+06, 5.763e+06
Z Bounds    6.000e+01, 1.070e+02
N Arrays    1
Data Arrays
Name    Field   Type    N Comp  Min Max
Labels  Points          1       nan nan

See also

add_row_to_boreholes

Adding a row to each borehole for later processing

create_lines_from_points

Creating lines from points

create_borehole_tube

Creating borehole tube

create_borehole_tubes

Creating tubes from lines

create_borehole_labels

Creating labels for boreholes