geost.bro.geotop.GeotopUnits#

class geost.bro.geotop.GeotopUnits(df: DataFrame, unit_type: UnitType, data_var: str, _nr: str = 'VOXEL_NR', _unit: str = 'STR_UNIT_CD', _desc: str = 'DESCRIPTION', _seq: str = 'SEQ_NR', _r: str = 'RED_DEC', _g: str = 'GREEN_DEC', _b: str = 'BLUE_DEC')[source]#

Container for stratigraphic and lithologic metadata information for the GeoTOP model.

Parameters:
  • df (pd.DataFrame) – DataFrame containing the metadata information.

  • metadata_type (UnitType) – Type of the metadata (stratigraphic or lithologic).

  • data_var (str) – Name of the GeoTOP variable that corresponds to the metadata (e.g. “strat” for stratigraphic units, “lithok” for lithologic units).

  • _nr (str, optional) – Column name for the voxel number in the metadata DataFrame. Default is “VOXEL_NR”.

  • _unit (str, optional) – Column name for the unit code in the metadata DataFrame. Default is “STR_UNIT_CD”.

  • _desc (str, optional) – Column name for the description in the metadata DataFrame. Default is “DESCRIPTION”.

  • _seq (str, optional) – Column name for the sequence number in the metadata DataFrame. Default is “SEQ_NR”.

  • _r (str, optional) – Column name for the red color value in the metadata DataFrame. Default is “RED_DEC”.

  • _g (str, optional) – Column name for the green color value in the metadata DataFrame. Default is “GREEN_DEC”.

  • _b (str, optional) – Column name for the blue color value in the metadata DataFrame. Default is “BLUE_DEC”.

__init__(df: DataFrame, unit_type: UnitType, data_var: str, _nr: str = 'VOXEL_NR', _unit: str = 'STR_UNIT_CD', _desc: str = 'DESCRIPTION', _seq: str = 'SEQ_NR', _r: str = 'RED_DEC', _g: str = 'GREEN_DEC', _b: str = 'BLUE_DEC') → None#

Methods

__init__(df, unit_type, data_var[, _nr, ...])

check_version_matches(geotop)

Check if the GeoTOP modeldata version matches the metadata version.

get_antropogenic_units()

Select metadata for all anthropogenic units.

get_holocene_channel_units()

Select metadata for all Holocene channel units.

get_holocene_units([include_channel_units])

Select metadata for all Holocene units.

get_plot_colormap()

Get a dictionary with a plot colormap and value boundaries for use in matplotlib figures.

select_description_contains(substring[, ...])

Select metadata by a substring for a partial description or descriptions.

select_unit(units)

Select metadata by unit codes (e.g. "NUNIBA", "zm").

select_unit_contains(substring[, case_sensitive])

Select metadata by a substring for a partial unit code or codes.

select_voxel_nr(values)

Select metadata by voxel numbers (e.g. 1090, 2010).

to_qml(path, *[, column, field, layer_type, ...])

Export metadata as a QGIS polygon vector or paletted raster style.

Attributes

colors_rgb

pandas.DataFrame containing the RGB color values for the units in the metadata.

description

pandas.Series containing the unique descriptions in the metadata.

geotop_version

GeoTOP version number (e.g. v01r6) of the metadata.

unit

pandas.Series containing the unique unit names in the metadata.

voxel_nr

pandas.Index containing the unique voxel numbers in the metadata.

df

unit_type

data_var