gemgis.visualization.create_borehole_labels#

gemgis.visualization.create_borehole_labels(df: Union[pandas.core.frame.DataFrame, geopandas.geodataframe.GeoDataFrame]) pyvista.core.pointset.PolyData#

Create labels for borehole plots.

Parameters

df (Union[pd.DataFrame, gpd.geodataframe.GeoDataFrame]) – (Geo-)DataFrame containing the borehole data.

Returns

borehole_locations – Borehole locations with labels.

Return type

pv.core.pointset.PolyData

New in version 1.0.x.

Changed in version 1.1.1: Fixed a ValueError that was introduced with pandas>2.0.0.

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 labels
>>> labels = gg.visualization.create_borehole_labels(df=df)
>>> 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_boreholes_3d

Creating PyVista objects for plotting.