pygplates.ResolvedTopologicalSharedSubSegment¶

class
pygplates.
ResolvedTopologicalSharedSubSegment
¶ Bases:
Boost.Python.instance
The shared subset of vertices of a reconstructed topological section that uniquely contribute to the boundaries of one or more resolved topologies.
Note
OnlyResolvedTopologicalBoundary
andResolvedTopologicalNetwork
have boundaries and hence will share ResolvedTopologicalSharedSubSegment instances.ResolvedTopologicalLine
is excluded since it does not have a boundary.The
resolve_topologies()
function can be used to generate resolved topology boundaries (ResolvedTopologicalBoundary
andResolvedTopologicalNetwork
) and the shared ResolvedTopologicalSharedSubSegment instances.Note
Each ResolvedTopologicalSharedSubSegment instance can be shared by one or more resolved topologies.In contrast, aResolvedTopologicalSubSegment
instance belongs to a single resolved topology.
__init__
()¶ Raises an exception This class cannot be instantiated from Python
Methods
__init__
Raises an exception This class cannot be instantiated from Python get_feature
()Same as get_topological_section_feature()
.get_geometry
()Same as get_resolved_geometry()
.get_overriding_and_subducting_plates
(…)Returns the overriding and subducting plates at this subduction zone. get_resolved_feature
()Returns a feature containing the resolved subsegment geometry. get_resolved_geometry
()Returns the geometry containing the shared subsegment vertices. get_sharing_resolved_topologies
()Returns a list of resolved topologies sharing this subsegment. get_sharing_resolved_topology_geometry_reversal_flags
()Returns a list of flags indicating whether a copy of the subsegment geometry was reversed when contributing to each resolved topology sharing this subsegment. get_sub_segments
()If this subsegment is from a topological line section
then return the childsubsegments
of the topological line contributing to this subsegment, otherwise returnNone
.get_topological_section
()Returns the topological section that the shared subsegment was obtained from. get_topological_section_feature
()Returns the feature referenced by the topological section. get_topological_section_geometry
()Returns the topological section geometry that the shared subsegment was obtained from. 
get_feature
()¶ Same as
get_topological_section_feature()
.

get_geometry
()¶ Same as
get_resolved_geometry()
.

get_overriding_and_subducting_plates
([return_subduction_polarity=False])¶ Returns the overriding and subducting plates at this subduction zone.
Parameters: return_subduction_polarity (bool) – whether to also return the subduction polarity Returns: a 2tuple containing the overriding and subducting resolved boundaries/networks, or a 3tuple that also contains the subduction polarity (eg, ‘Left’, ‘Right’, ‘Unknown’) if return_subduction_polarity is True
, orNone
if the subduction polarity is not properly set or there are not exactly 2 topologies sharing this subsegmentReturn type: 2tuple of ReconstructionGeometry
, or 3tuple adding a str, orNone
Note
Returns
None
if either the subduction polarity is not properly set or there are not exactly 2 topologies sharing the subsegment.To find the overriding and subducting plate IDs of all subduction zone lines:
# Resolve our topological plate polygons (and deforming networks) to the current 'time'. # We generate both the resolved topology boundaries and the boundary sections between them. resolved_topologies = [] shared_boundary_sections = [] pygplates.resolve_topologies(topology_features, rotation_model, resolved_topologies, time, shared_boundary_sections) # Iterate over the shared boundary sections of all resolved topologies. for shared_boundary_section in shared_boundary_sections: # Skip sections that are not subduction zones. if shared_boundary_section.get_feature().get_feature_type() != pygplates.FeatureType.gpml_subduction_zone: continue # Iterate over the shared subsegments of the current subducting line. # These are the parts of the subducting line that actually contribute to topological boundaries. for shared_sub_segment in shared_boundary_section.get_shared_sub_segments(): # Get the overriding and subducting resolved plates/networks on either side of the current shared subsegment. overriding_and_subducting_plates = shared_sub_segment.get_overriding_and_subducting_plates(True) if overriding_and_subducting_plates: overriding_plate, subducting_plate, subduction_polarity = overriding_and_subducting_plates overriding_plate_id = overriding_plate.get_feature().get_reconstruction_plate_id() subducting_plate_id = subducting_plate.get_feature().get_reconstruction_plate_id()
New in version 23.

get_resolved_feature
()¶ Returns a feature containing the resolved subsegment geometry.
Return type: Feature
The returned feature contains the
resolved geometry
.Note
The returned feature does not contain presentday geometry as is typical of most GPlates features.In this way the returned feature is similar to a GPlates reconstruction export.Note
The returned feature should not be
reverse reconstructed
to present day because the topological section might be aResolvedTopologicalLine
which is a topology and topologies are resolved (not reconstructed).See also

get_resolved_geometry
()¶ Returns the geometry containing the shared subsegment vertices.
Return type: PolylineOnSphere
Note
These are the unreversed vertices. They are in the same order as the geometry of
get_topological_section_geometry()
. If you need a reversed version of this resolved geometry (eg, due toget_sharing_resolved_topology_geometry_reversal_flags()
returningTrue
for a particular topology) then you can usepygplates.PolylineOnSphere(sub_segment.get_resolved_geometry()[::1])
.

get_sharing_resolved_topologies
()¶ Returns a list of resolved topologies sharing this subsegment.
Return type: list of ReconstructionGeometry
Note
The resolved topologies (that share this subsegment) can beResolvedTopologicalBoundary
andResolvedTopologicalNetwork
.ResolvedTopologicalLine
is excluded since it does not have a boundary.

get_sharing_resolved_topology_geometry_reversal_flags
()¶ Returns a list of flags indicating whether a copy of the subsegment geometry was reversed when contributing to each resolved topology sharing this subsegment.
Return type: list of bool Note
The returned list is in the same order (and has the same number of elements) as the list of sharing resolved topologies returned in
get_sharing_resolved_topologies()
.sharing_resolved_topologies = shared_sub_segment.get_sharing_resolved_topologies() geometry_reversal_flags = shared_sub_segment.get_sharing_resolved_topology_geometry_reversal_flags() for index in range(len(sharing_resolved_topologies)): sharing_resolved_topology = sharing_resolved_topologies[index] geometry_reversal_flag = geometry_reversal_flags[index]
See also

get_sub_segments
()¶ If this subsegment is from a topological line
section
then return the childsubsegments
of the topological line contributing to this subsegment, otherwise returnNone
.Return type: list of ResolvedTopologicalSubSegment
, orNone
To see if a shared subsegment is from a topological line and then iterate over its child subsegments:
child_sub_segments_of_topological_line_shared_sub_segment = shared_sub_segment.get_sub_segments() if child_sub_segments_of_topological_line_shared_sub_segment: for child_sub_segment in child_sub_segments_of_topological_line_shared_sub_segment: child_sub_segment_geometry = child_sub_segment.get_resolved_geometry() child_sub_segment_plate_id = child_sub_segment.get_feature().get_reconstruction_plate_id() else: sub_segment_geometry = shared_sub_segment.get_resolved_geometry() sub_segment_plate_id = shared_sub_segment.get_feature().get_reconstruction_plate_id()
Note
Each child subsegment has its own
reverse flag
indicating whether it was reversed when contributing to this shared subsegment. And this shared subsegment also has areverse flag
, for each final boundary topology that shares it, which determines whether this shared subsegment was reversed when contributing to each final boundary topology. So whether a child subsegment was effectively reversed when contributing to a final boundary topology depends on both reverse flags (of the child subsegment and this shared subsegment). For example, if the child subsegment was reversed in this shared subsegment, and this shared subsegment was reversed in a final boundary, then the child subsegment was not reversed in that final boundary.New in version 22.

get_topological_section
()¶ Returns the topological section that the shared subsegment was obtained from.
Return type: ReconstructionGeometry
Note
This represents the entire geometry of the topological section, not just the part that contributes to the shared subsegment.
Note
This topological section can be either aReconstructedFeatureGeometry
or aResolvedTopologicalLine
.The resolved topologies that share the topological section can beResolvedTopologicalBoundary
andResolvedTopologicalNetwork
.See also

get_topological_section_feature
()¶ Returns the feature referenced by the topological section.
Return type: Feature
Note
The geometry in the returned feature represents the entire geometry of the topological section, not just the part that contributes to the shared subsegment.
See also

get_topological_section_geometry
()¶ Returns the topological section geometry that the shared subsegment was obtained from.
Return type: PolylineOnSphere
Note
This is the entire geometry of the topological section, not just the part that contributes to the shared subsegment.
See also
