geoh5py.shared.merging package#

Submodules#

geoh5py.shared.merging.base module#

class geoh5py.shared.merging.base.BaseMerger#

Bases: ABC

abstract classmethod create_object(workspace: Workspace, input_entities, **kwargs)#

Create an object with the structure of all the input entities. :param workspace: The workspace to use to create the object. :param input_entities: all the input entities to merge. :param kwargs: the kwargs to create the new object. :return: the new object.

classmethod merge_data(out_entity, input_entities: list)#

Merge the data respecting the entity type, the values, and the association. :param out_entity: the output entity to add the data to. :param input_entities: the list of objects to merge the data from. :return: a dictionary of data to add to the merged object.

classmethod merge_objects(workspace: Workspace, input_entities: list[ObjectBase], add_data: bool = True, **kwargs)#

Merge a list of :obj:geoh5py.objects.ObjectBase of the same type.

Parameters:
  • workspace – the workspace to use.

  • input_entities – the list of objects to merge.

  • add_data – if True, the data will be merged.

  • kwargs – the kwargs to create the new object.

Returns:

an object of type input_entities[0] containing the merged vertices.

classmethod validate_objects(input_entities: list[ObjectBase])#

Validate the input entities types and raises error if incompatible.

Parameters:

input_entities – a list of :obj:geoh5py.objects.ObjectBase objects.

abstract classmethod validate_structure(input_entity)#

Validate the input entity structure and raises error if incompatible. :param input_entity: the input entity to validate.

classmethod validate_type(input_entity)#

geoh5py.shared.merging.cell module#

class geoh5py.shared.merging.cell.CellMerger#

Bases: PointsMerger

classmethod create_object(workspace: Workspace, input_entities: list, **kwargs) CellObject#

Create a new object of type cls._type from a list of input entities. It merges the cells together and create a new object with the merged cells.

Parameters:
  • workspace – The workspace to create the object in.

  • input_entities – The list of input entities to merge together.

  • kwargs – The kwargs to pass to the object creation.

Returns:

The newly created object merged from input_entities.

class geoh5py.shared.merging.cell.CurveMerger#

Bases: CellMerger

class geoh5py.shared.merging.cell.SurfaceMerger#

Bases: CellMerger

geoh5py.shared.merging.drape_model module#

class geoh5py.shared.merging.drape_model.DrapeModelMerger#

Bases: BaseMerger

classmethod create_object(workspace: Workspace, input_entities: list, **kwargs) DrapeModel#

Create a new DrapeModel from a list of input DrapeModels.

It merges the cells together and create a new object with the merged cells.

Parameters:
  • workspace – The workspace to create the object in.

  • input_entities – The list of input entities to merge together.

  • kwargs – The kwargs to pass to the object creation.

Returns:

The newly created object merged from input_entities.

classmethod merge_data(out_entity, input_entities: list[DrapeModel])#

Merge the data respecting the entity type, the values, and the association. :param out_entity: the output entity to add the data to. :param input_entities: the list of objects to merge the data from. :return: a dictionary of data to add to the merged object.

classmethod validate_structure(input_entity: DrapeModel)#

Validate the input entity structure and raises error if incompatible. :param input_entity: the input entity to validate.

geoh5py.shared.merging.points module#

class geoh5py.shared.merging.points.PointsMerger#

Bases: BaseMerger

classmethod create_object(workspace: Workspace, input_entities: list, **kwargs) Points#

Create an object with the structure of all the input entities. :param workspace: The workspace to use to create the object. :param input_entities: all the input entities to merge. :param kwargs: the kwargs to create the new object. :return: the new object.

classmethod validate_structure(input_entity: Points)#

Validate the input entity structure and raises error if incompatible. :param input_entity: the input entity to validate.

Module contents#