pygplates.ResolvedTopologicalSubSegment

class pygplates.ResolvedTopologicalSubSegment

Bases: instance

The subset of vertices of a reconstructed topological section that contribute to the geometry of a resolved topology.

TopologicalModel, TopologicalSnapshot or resolve_topologies() can be used to generate resolved topologies (such as ResolvedTopologicalLine, ResolvedTopologicalBoundary and ResolvedTopologicalNetwork) which, in turn, reference these ResolvedTopologicalSubSegment instances.

Note

Each ResolvedTopologicalSubSegment instance belongs to a single resolved topology.
In contrast, a ResolvedTopologicalSharedSubSegment 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 sub-segment geometry.

get_resolved_geometry()

Returns the geometry containing the sub-segment vertices.

get_resolved_geometry_point_velocities(...)

Returns the velocities of the resolved geometry points.

get_resolved_geometry_points()

Returns the points of the resolved geometry.

get_sub_segments()

If this sub-segment is from a topological line section then return the child sub-segments of the topological line contributing to this sub-segment, otherwise return None.

get_topological_section()

Returns the topological section that the sub-segment 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 sub-segment 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 sub-segment is a part of.

get_feature()

Same as get_topological_section_feature().

Warning

The geometry in the feature is present day geometry - it is NOT reconstructed like get_geometry() is.
See get_resolved_feature() for a resolved feature containing reconstructed geometry.
get_geometry()

Same as get_resolved_geometry().

get_resolved_feature()

Returns a feature containing the resolved sub-segment geometry.

Return type:

Feature

The returned feature contains the resolved geometry.

Note

The returned feature does not contain present-day 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 a ResolvedTopologicalLine which is a topology and topologies are resolved (not reconstructed).

get_resolved_geometry()

Returns the geometry containing the sub-segment 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 to was_geometry_reversed_in_topology() returning True) then you can use pygplates.PolylineOnSphere(sub_segment.get_resolved_geometry()[::-1]).

get_resolved_geometry_point_velocities([velocity_delta_time=1.0][, velocity_delta_time_type=pygplates.VelocityDeltaTimeType.t_plus_delta_t_to_t][, velocity_units=pygplates.VelocityUnits.kms_per_my][, earth_radius_in_kms=pygplates.Earth.mean_radius_in_kms])

Returns the velocities of the resolved geometry points.

Parameters:
  • velocity_delta_time (float) – The time delta used to calculate velocities (defaults to 1 Myr).

  • velocity_delta_time_type (VelocityDeltaTimeType.t_plus_delta_t_to_t, VelocityDeltaTimeType.t_to_t_minus_delta_t or VelocityDeltaTimeType.t_plus_minus_half_delta_t) – How the two velocity times are calculated relative to the reconstruction time. This includes [t+dt, t], [t, t-dt] and [t+dt/2, t-dt/2]. Defaults to [t+dt, t].

  • velocity_units (VelocityUnits.kms_per_my or VelocityUnits.cms_per_yr) – whether to return velocities as kilometres per million years or centimetres per year (defaults to kilometres per million years)

  • earth_radius_in_kms (float) – the radius of the Earth in kilometres (defaults to pygplates.Earth.mean_radius_in_kms)

Return type:

list of Vector3D

To associate each velocity with its point (in a sub-segment):

points = sub_segment.get_resolved_geometry_points()
velocities = sub_segment.get_resolved_geometry_point_velocities()

points_and_velocities = zip(points, point_velocities)

for point, velocity in points_and_velocities:
  ...

Added in version 0.50.

get_resolved_geometry_points()

Returns the points of the resolved geometry.

Return type:

list of PointOnSphere

This method is essentially equivalent to:

def get_resolved_geometry_points(resolved_topological_sub_segment):
    return resolved_topological_sub_segment.get_resolved_geometry().get_points()

Added in version 0.50.

get_sub_segments()

If this sub-segment is from a topological line section then return the child sub-segments of the topological line contributing to this sub-segment, otherwise return None.

Return type:

list of ResolvedTopologicalSubSegment, or None

To see if a sub-segment is from a topological line and then iterate over its child sub-segments:

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 sub-segment has its own reverse flag indicating whether it was reversed when contributing to this sub-segment. And this sub-segment also has a reverse flag which determines whether it was reversed when contributing to the final boundary topology. So whether a child sub-segment was effectively reversed when contributing to the final boundary topology depends on both reverse flags (of the child sub-segment and this sub-segment). For example, if the child sub-segment was reversed in this sub-segment, and this sub-segment was reversed in the final boundary, then the child sub-segment was not reversed in the final boundary.

Added in version 0.22.

get_topological_section()

Returns the topological section that the sub-segment was obtained from.

Return type:

ReconstructionGeometry

Note

This represents the entire geometry of the topological section, not just the part that contributes to the sub-segment.

Note

If the resolved topology (that this sub-segment is a part of) is a ResolvedTopologicalLine then the topological section will be a ReconstructedFeatureGeometry.
If the resolved topology (that this sub-segment is a part of) is a ResolvedTopologicalBoundary or a ResolvedTopologicalNetwork then the topological section can be either a ReconstructedFeatureGeometry or a ResolvedTopologicalLine.
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 sub-segment.

Warning

The geometry in the feature is present day geometry - it is NOT reconstructed like get_topological_section_geometry() is.
See get_resolved_feature() for a resolved feature containing reconstructed geometry.
get_topological_section_geometry()

Returns the topological section geometry that the sub-segment was obtained from.

Return type:

PolylineOnSphere

Note

This is the entire geometry of the topological section, not just the part that contributes to the sub-segment.

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 sub-segment is a part of.

Return type:

bool

Note

A reversed version of the points of get_resolved_geometry() is equivalent sub_segment.get_resolved_geometry().get_points()[::-1].