gemgis.visualization.create_borehole_tubes
gemgis.visualization.create_borehole_tubes#
- gemgis.visualization.create_borehole_tubes(df: pandas.core.frame.DataFrame, min_length: Union[float, int], radius: Union[int, float] = 10) Tuple[List[pyvista.core.pointset.PolyData], List[pandas.core.frame.DataFrame]] #
Creating PyVista Tubes for plotting boreholes in 3D
- Parameters
df (pd.DataFrame) – DataFrame containing the extracted borehole data
min_length (Union[float, int]) – Length defining the minimum depth of boreholes to be plotted, e.g.
min_length=1000
radius (Union[int, float]) – Radius of the boreholes plotted with PyVista, e.g.
radius=100
default is10
m
- Returns
tubes (List[pv.core.pointset.PolyData]) – List of PyVista PolyData Objects
df_groups (List[pd.DataFrame]) – List of DataFrames containing the borehole data
New in version 1.0.x.
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 borehole tubes >>> tubes, df_groups = gg.visualization.create_borehole_tubes(df=df, min_length=1000, radius=100) >>> tubes[0] Header PolyData Information N Cells 418 N Points 1520 X Bounds 3.239e+07, 3.239e+07 Y Bounds 5.762e+06, 5.764e+06 Z Bounds -5.849e+03, 1.070e+02 N Arrays 2 Data Arrays Name Field Type N Comp Min Max scalars Points int32 1 0.000e+00 1.900e+01 TubeNormals Points float32 3 -1.000e+00 1.000e+00
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_labels
Creating labels for boreholes
create_boreholes_3d
Creating PyVista objects for plotting