Reference

Column

class geoprofile.column.Column(classify, x, y, name='N/A', z=None, groundwater_level=None, data=None)[source]
__init__(classify, x, y, name='N/A', z=None, groundwater_level=None, data=None)[source]

Holds the data related to a column in the profile.

Parameters:
  • classify (dict) –

    Dictionary that holds the classification data. Must contain the following keys:

    • depth

      Top of the layers [m REF]

    • thickness

      Thickness of the layer [m]

    • geotechnicalSoilName

      Soil code of the layer related to the NEN-EN-ISO 14688-1:2019+NEN 8990:2020 Tabel NA.17

  • x (float) – x coordinate of the column. Must be in a Cartesian coordinate system

  • y (float) – x coordinate of the column. Must be in a Cartesian coordinate system

  • name (str, optional) – default is N/A Name of the location.

  • z (float, optional) – Default is None surface level of the column [m REF].

  • groundwater_level (float, optional) – Default is None groundwater level of the column [m REF].

  • data (dict) –

    Default is None Other data that can be added to the plot. If not None than dictionary must contain the following key:

    • depth

      Top of the layers [m REF]

property classify: dict

dictionary that holds the classification data

property data: dict

dictionary that holds the other data

classmethod from_bore(gef)[source]

Transform the BoreData DataClass to our Column class

Parameters:

gef (pygef.bore.BoreData) – Bore object created by pygef.

Return type:

Column

classmethod from_cpt(response, gef)[source]

Use the cptcore response to translate the NEN6740 Table 2B to the NEN-EN-ISO 14688-1:2019+NEN 8990:2020 Tabel NA.17

Parameters:
  • response (dict) – response of the CPT Core classify API call

  • gef (pygef.cpt.CptData) – CPT object created by pygef.

Return type:

Column

property groundwater_level: float | None

groundwater level [m REF]

property name: str

column name

plot(figure=None, hue='percentage', plot_kwargs=None, x0=0, d_left=0.5, d_right=0.5, fillpattern=True, profile=False)[source]

Create a plotly figure with the Soil Layout and the Data.

Parameters:
  • figure (Figure, optional) – Default is None A plotly graph object.

  • hue (str, optional) – default is percentage enum : [‘percentage’, ‘uniform’] Show either the soil data in percentage or use a uniform color.

  • plot_kwargs (Dict, optional) –

    Default is None Dictionary with keys for properties to plot:

    ``` python

    {

    “qc”: {

    “line_color”: “black”,

    ”factor”: 1,

    },

    ”fr”: {“line_color”: “red”},

    }

    ```

  • x0 (float, optional) – Default is 0 The x-coordinate of the start of the Soil Layout plot

  • d_left (float, optional) – Default is 0.5 The width of the Soil Layout plot left of the center line. Only used when heu is not percentage. If percentage the sum of d_right and d_left is DEFAULT_COLUMN_WIDTH.

  • d_right (float, optional) – Default is 0.5 The width of the Soil Layout plot right of the center line. Only used when heu is not percentage. If percentage the sum of d_right and d_left is DEFAULT_COLUMN_WIDTH.

  • fillpattern (bool, optional) – Default is True Fill the layers with the pattern related to the soil code of the layer based on the NEN-EN-ISO 14688-1:2019+NEN 8990:2020 Tabel NA.17

  • profile (bool, optional) – Default is False Flag that indicates if plot is standalone or part on of a profile.

Return type:

Figure

property x: float

x coordinate

property y: float

y coordinate

property z: float | None

surface level [m REF]

CrossSection

class geoprofile.profile.Section(data_list, profile_line, buffer=10, sorting_algorithm='nearest_neighbor', reproject=True)[source]
__init__(data_list, profile_line, buffer=10, sorting_algorithm='nearest_neighbor', reproject=True)[source]

Class that filters, sorts and plot columns based on a profile line.

Parameters:
  • data_list (list) – List with Column classes.

  • profile_line (LineString) – profile line of the scoss section.

  • buffer (float, optional) – Default is 10 Buffer distance use to include columns in the profile [m]

  • sorting_algorithm (str, optional) –

    Default is nearest_neighbor. Define the sorting algorithm use to sort the data points. Can be one of the following:

    • tsp (traveling salesman problem)

    • nearest_neighbor

    • custom

  • reproject (bool, optional) – Default is True Reproject points of the column onto the profile line.

property buffer: float

buffer distance use to include columns in the profile [m]

property coordinates_all: ndarray[Any, dtype[floating]]

list of coordinates of the all the column locations

property coordinates_include: ndarray[Any, dtype[floating]]

list of coordinates of the selected column locations

property coordinates_include_reprojection: Dict[int | str, List[float]]

list of coordinates of the selected column locations reprojected on the profile line

property data_list_all: List[Column]

all columns provided by initializing the class

property data_list_include: List[Column]

selected columns based on profile polygon

property distance_matrix_include: ndarray[Any, dtype[floating]]

Compute the distance matrix. Returns the matrix of all pair-wise distances [m].

property distance_matrix_include_reprojection: ndarray[Any, dtype[floating]]

Compute the distance matrix. Returns the matrix of all pair-wise distances [m].

property end_node: int

Closed column point on the end of the profile line

plot(figure=None, x0=0.0, groundwater_level=False, surface_level=False, **kwargs)[source]

Create profile based on the column’s location, sorting algorithm and profile line.

Parameters:
  • figure (Figure, optional) – A plotly Figure to add the profile to.

  • x0 (float, optional) – Default is 0.0 Start of the profile line.

  • groundwater_level (bool, optional) – Default is False Flag that indicated if groundwater level is added to the profile

  • surface_level (bool, optional) – Default is False Flag that indicated if groundwater level is added to the profile

  • kwargs (Any) – kwargs past to the column plot function.

Return type:

plotly.graph_objs.Figure

plot_map(axis=None, add_basemap=False, add_tags=True, debug=False)[source]
Create a map that contain the following:
  • location of the columns (gray point)

  • location of the selected columns (black point)

  • profile line (gray line)

  • profile polygon (light gray area)

  • re-projection (black line)

Parameters:
  • axis (plt.Axes, optional) – plt.Axes used to create the map

  • add_basemap (bool, optional) – default is False Flag that includes basemap in figure.

  • add_tags (bool, optional) – default is True Show the CTP names as tags on the map

Return type:

plt.Axes

property profile_line: LineString

profile line of the scoss section.

property profile_polygon: LineString

polygon create based on the profile line and the buffer argument

property reproject: bool

reproject points of the column onto the profile line.

property sorting: tuple

Based on the soring algorithm the columns are sorted.

Returns:

  • permutation – A permutation of nodes from 0 to n that produces the least total distance

  • distance – The total distance the optimal permutation produces

property sorting_algorithm: str

sorting algorithm used to sort columns to profile line

property start_node: int

Closed column point on the start of the profile line