geost.add_positional_columns#

geost.add_positional_columns(columns: dict[str, str | list[str]], persist: bool = False) None[source]#

Provide additional positional columns for GeoST to get methods to work correctly with unknown names for positional columns.

Optional positional columns to provide are: - “nr”: Specifies identification name/number/code of the point survey. - “x”: Specifies X-, Easting- or lon-coordinates. - “y”: Specifies Y-, Northing- or lat-coordinates. - “surface”: Specifies surface elevation of surveys. - “end”: Specifies end elevation of surveys. - “depth”: Specifies the depth of a measurement or bottom depth of a layer. - “top”: Specifies the top depth of a layer.

Parameters:
  • columns (dict[str, str | list[str]]) – The original columns dictionary to which positional columns will be added.

  • persist (bool, optional) – If True, the changes will be saved to a user configuration file. Then additional columns will be loaded from this file in future sessions. The default is False.

Returns:

Adds the provided columns to the set of internal valid names for positional columns.

Return type:

None

Examples

Add a single alias for the “x” positional column and only for the current session:

>>> import geost
>>> geost.add_positional_columns({"x_coordinate": "my-x-column"})

Add multiple aliases for the “y” positional column and persist the changes for future sessions:

>>> import geost
>>> geost.add_positional_columns({"y_coordinate": ["my-y-column", "y_coord"]}, persist=True)