geoh5py.shared.merging package

Submodules

geoh5py.shared.merging.base module

class geoh5py.shared.merging.base.BaseMerger[source]

Bases: ABC

abstract classmethod create_object(workspace: Workspace, input_entities, **kwargs)[source]

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)[source]

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)[source]

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])[source]

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)[source]

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

classmethod validate_type(input_entity)[source]

geoh5py.shared.merging.cell module

class geoh5py.shared.merging.cell.CellMerger[source]

Bases: PointsMerger

classmethod create_object(workspace: Workspace, input_entities: list, **kwargs) CellObject[source]

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[source]

Bases: CellMerger

class geoh5py.shared.merging.cell.SurfaceMerger[source]

Bases: CellMerger

geoh5py.shared.merging.drape_model module

class geoh5py.shared.merging.drape_model.DrapeModelMerger[source]

Bases: BaseMerger

classmethod create_object(workspace: Workspace, input_entities: list, **kwargs) DrapeModel[source]

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])[source]

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)[source]

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[source]

Bases: BaseMerger

classmethod create_object(workspace: Workspace, input_entities: list, **kwargs) Points[source]

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)[source]

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

Module contents