pygplates.ResolvedTopologicalSubSegment¶

class
pygplates.
ResolvedTopologicalSubSegment
¶ Bases:
Boost.Python.instance
The subset of vertices of a reconstructed topological section that contribute to the geometry of a resolved topology.
The
resolve_topologies()
function can be used to generate resolved topologies (such asResolvedTopologicalLine
,ResolvedTopologicalBoundary
andResolvedTopologicalNetwork
) which, in turn, reference these ResolvedTopologicalSubSegment instances.Note
Each ResolvedTopologicalSubSegment instance belongs to a single resolved topology.In contrast, aResolvedTopologicalSharedSubSegment
instance can be shared by one or more resolved topologies.
__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_resolved_feature
()Returns a feature containing the resolved subsegment geometry. get_resolved_geometry
()Returns the geometry containing the subsegment vertices. 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 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 subsegment was obtained from. was_geometry_reversed_in_topology
()Whether a copy of the points in get_resolved_geometry()
were reversed in order to contribute to the resolved topology that this subsegment is a part of.
get_feature
()¶ Same as
get_topological_section_feature()
.

get_geometry
()¶ Same as
get_resolved_geometry()
.

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 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 towas_geometry_reversed_in_topology()
returningTrue
) then you can usepygplates.PolylineOnSphere(sub_segment.get_resolved_geometry()[::1])
.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 subsegment is from a topological line and then iterate over its child subsegments:
child_sub_segments_of_topological_line_sub_segment = sub_segment.get_sub_segments() if child_sub_segments_of_topological_line_sub_segment: for child_sub_segment in child_sub_segments_of_topological_line_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 = sub_segment.get_resolved_geometry() sub_segment_plate_id = 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 subsegment. And this subsegment also has areverse flag
which determines whether it was reversed when contributing to the final boundary topology. So whether a child subsegment was effectively reversed when contributing to the final boundary topology depends on both reverse flags (of the child subsegment and this subsegment). For example, if the child subsegment was reversed in this subsegment, and this subsegment was reversed in the final boundary, then the child subsegment was not reversed in the final boundary.New in version 22.

get_topological_section
()¶ Returns the topological section that the 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 subsegment.
Note
If the resolved topology (that this subsegment is a part of) is aResolvedTopologicalLine
then the topological section will be aReconstructedFeatureGeometry
.If the resolved topology (that this subsegment is a part of) is aResolvedTopologicalBoundary
or aResolvedTopologicalNetwork
then the topological section can be either aReconstructedFeatureGeometry
or aResolvedTopologicalLine
.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 subsegment.
See also

get_topological_section_geometry
()¶ Returns the topological section geometry that the 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 subsegment.
See also

was_geometry_reversed_in_topology
()¶ Whether a copy of the points in
get_resolved_geometry()
were reversed in order to contribute to the resolved topology that this subsegment is a part of.Return type: bool Note
A reversed version of the points of
get_resolved_geometry()
is equivalentsub_segment.get_resolved_geometry().get_points()[::1]
.See also
