pygplates.ResolvedTopologicalLine
- class pygplates.ResolvedTopologicalLine
Bases:
ReconstructionGeometry
The geometry of a topological line feature resolved to a geological time.
TopologicalModel
,TopologicalSnapshot
orresolve_topologies()
can be used to generate ResolvedTopologicalLine instances.- __init__()
Raises an exception This class cannot be instantiated from Python
Methods
Raises an exception This class cannot be instantiated from Python
Returns the feature associated with this
ResolvedTopologicalLine
.Same as
get_line_sub_segments()
.Returns the
sub-segments
that make up the line of this resolved topological line.Returns the feature property containing the topological line property associated with this
ResolvedTopologicalLine
.get_reconstruction_time
()Returns the reconstruction time that this instance was created at.
Returns a feature containing the resolved line geometry.
Same as
get_resolved_line()
.Returns the velocities of the
resolved geometry points
.Returns the points of the
resolved geometry
.Returns the resolved line geometry.
- get_feature()
Returns the feature associated with this
ResolvedTopologicalLine
.- Return type:
Note
The returned feature is what was used to generate this
ResolvedTopologicalLine
viaTopologicalModel
,TopologicalSnapshot
orresolve_topologies()
.See also
- get_geometry_sub_segments()
Same as
get_line_sub_segments()
.
- get_line_sub_segments()
Returns the
sub-segments
that make up the line of this resolved topological line.- Return type:
list of
ResolvedTopologicalSubSegment
To get a list of the unreversed sub-segment geometries:
sub_segment_geometries = [] for sub_segment in resolved_topological_line.get_line_sub_segments(): sub_segment_geometries.append(sub_segment.get_resolved_geometry())
To get a list of sub-segment geometries with points in the same order as this topological line:
sub_segment_geometries = [] for sub_segment in resolved_topological_line.get_line_sub_segments(): sub_segment_geometry = sub_segment.get_resolved_geometry() if sub_segment.was_geometry_reversed_in_topology(): # Create a new sub-segment polyline with points in reverse order. sub_segment_geometry = pygplates.PolylineOnSphere(sub_segment_geometry[::-1]) sub_segment_geometries.append(sub_segment_geometry)
The following is essentially equivalent to
get_resolved_line()
(except rubber banding points, if any, between adjacent sub-segments are included below but not inget_resolved_line()
):def get_resolved_line(resolved_topological_line): resolved_line_points = [] for sub_segment in resolved_topological_line.get_line_sub_segments(): sub_segment_points = sub_segment.get_resolved_geometry().get_points() if sub_segment.was_geometry_reversed_in_topology(): # Reverse the sub-segment points. sub_segment_points = sub_segment_points[::-1] resolved_line_points.extend(sub_segment_points) return pygplates.PolylineOnSphere(resolved_line_points)
- get_property()
Returns the feature property containing the topological line property associated with this
ResolvedTopologicalLine
.- Return type:
This is the
Property
that theget_resolved_line()
andget_resolved_geometry()
are obtained from.
- get_resolved_feature()
Returns a feature containing the resolved line geometry.
- Return type:
The returned feature contains the static
resolved geometry
. Unlikeget_feature()
it cannot be used to generate aResolvedTopologicalLine
viaTopologicalModel
,TopologicalSnapshot
orresolve_topologies()
.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 topologies are resolved (not reconstructed).See also
- get_resolved_geometry()
Same as
get_resolved_line()
.
- 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 resolved topological line):
points = resolved_topological_line.get_resolved_geometry_points() velocities = resolved_topological_line.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_line): return resolved_topological_line.get_resolved_geometry().get_points()
See also
Added in version 0.50.
- get_resolved_line()
Returns the resolved line geometry.
- Return type: