resqpy.strata.GeologicUnitInterpretation¶
- class resqpy.strata.GeologicUnitInterpretation(parent_model, uuid=None, title=None, domain='time', geologic_unit_feature=None, composition=None, material_implacement=None, extra_metadata=None)¶
Bases:
BaseResqpy
Class for RESQML Geologic Unit Interpretation objects.
These objects can be parts in their own right. NB: Various more specialised classes also derive from this.
RESQML documentation:
The main class for data describing an opinion of a volume-based geologic feature or unit.
Public Data Attributes:
resqml_type
Inherited from
BaseResqpy
resqml_type
Standard part name corresponding to self.uuid.
XML node corresponding to self.uuid.
Citation block title equivalent to self.title.
Methods:
__init__
(parent_model[, uuid, title, ...])Initialises an geologic unit interpretation object.
is_equivalent
(other[, check_extra_metadata])Returns True if this interpretation is essentially the same as the other; otherwise False.
create_xml
([add_as_part, add_relationships, ...])Creates a geologic unit interpretation xml tree.
Inherited from
BaseResqpy
__init__
(parent_model[, uuid, title, ...])Initialises an geologic unit interpretation object.
Look for an equivalent existing RESQML object and modify the uuid of this object if found.
create_xml
([add_as_part, add_relationships, ...])Creates a geologic unit interpretation xml tree.
append_extra_metadata
(meta_dict)Append a given dictionary of metadata to the existing metadata.
__eq__
(other)Implements equals operator; uses is_equivalent() otherwise compares class type and uuid.
__ne__
(other)Implements not equal operator.
__repr__
()String representation.
- __init__(parent_model, uuid=None, title=None, domain='time', geologic_unit_feature=None, composition=None, material_implacement=None, extra_metadata=None)[source]¶
Initialises an geologic unit interpretation object.
- Parameters
parent_model (model.Model) – the model with which the new interpretation will be associated
uuid (uuid.UUID, optional) – the uuid of an existing RESQML geologic unit interpretation from which this object will be initialised
title (str, optional) – the citation title (feature name) of the new interpretation; ignored if uuid is not None
domain (str, default 'time') – ‘time’, ‘depth’ or ‘mixed’, being the domain of the interpretation; ignored if uuid is not None
geologic_unit_feature (organize.GeologicUnitFeature or StratigraphicUnitFeature, optional) – the feature which this object is an interpretation of; ignored if uuid is not None
composition (str, optional) – the interpreted composition of the geologic unit; if present, must be in valid_compositions; ignored if uuid is not None
material_implacement (str, optional) – the interpeted material implacement of the geologic unit; if present, must be in valid_implacements, ie. ‘autochtonous’ or ‘allochtonous’; ignored if uuid is not None
extra_metadata (dict, optional) – extra metadata items for the new interpretation
- Returns
a new geologic unit interpretation resqpy object which may be the basis of a derived class object
Note
the RESQML 2.0.1 schema definition includes a spurious trailing space in the names of two compositions; resqpy removes such spaces in the composition attribute as presented to calling code (but includes them in xml)
- append_extra_metadata(meta_dict)¶
Append a given dictionary of metadata to the existing metadata.
- property citation_title¶
Citation block title equivalent to self.title.
- create_xml(add_as_part=True, add_relationships=True, originator=None, reuse=True)[source]¶
Creates a geologic unit interpretation xml tree.
- Parameters
add_as_part (bool, default True) – if True, the interpretation is added to the parent model as a high level part
add_relationships (bool, default True) – if True and add_as_part is True, a relationship is created with the referenced geologic unit feature
originator (str, optional) – if present, is used as the originator field of the citation block
reuse (bool, default True) – if True, the parent model is inspected for any equivalent interpretation and, if found, the uuid of this interpretation is set to that of the equivalent part
- Returns
lxml.etree._Element – the root node of the newly created xml tree for the interpretation
- is_equivalent(other, check_extra_metadata=True)[source]¶
Returns True if this interpretation is essentially the same as the other; otherwise False.
- Parameters
other (GeologicUnitInterpretation or StratigraphicUnitInterpretation) – the other interpretation to compare this one against
check_extra_metadata (bool, default True) – if True, then extra metadata items must match for the two interpretations to be deemed equivalent; if False, extra metadata is ignored in the comparison
- Returns
bool – True if this interpretation is essentially the same as the other; False otherwise
- property part¶
Standard part name corresponding to self.uuid.
- property root¶
XML node corresponding to self.uuid.
- try_reuse()¶
Look for an equivalent existing RESQML object and modify the uuid of this object if found.
- Returns
boolean – True if an equivalent object was found, False if not
Note
by design this method may change this object’s uuid as a side effect
- title¶
Citation title
- originator¶
Creator of object. By default, user id.
- uuid¶
Unique identifier