# pygplates.ReconstructionTreeBuilder¶

class pygplates.ReconstructionTreeBuilder

Bases: Boost.Python.instance

Enable incremental building of a reconstruction tree by inserting total reconstruction poles.

The following example demonstrates the general procedure for incrementally building a ReconstructionTree:

builder = pygplates.ReconstructionTreeBuilder()
...
builder.insert_total_reconstruction_pole(fixed_plate_id1, moving_plate_id1, total_rotation_moving_plate_id1_relative_fixed_plate_id1)
builder.insert_total_reconstruction_pole(fixed_plate_id2, moving_plate_id2, total_rotation_moving_plate_id2_relative_fixed_plate_id2)
...
reconstruction_tree = builder.build_reconstruction_tree(anchor_plate_id, reconstruction_time)


The ReconstructionTree.__init__() method of class ReconstructionTree uses ReconstructionTreeBuilder to create itself from rotation features.

__init__()

Methods

 __init__() build_reconstruction_tree(anchor_plate_id, ...) Builds a ReconstructionTree from the total reconstruction poles inserted via insert_total_reconstruction_pole(). insert_total_reconstruction_pole(...) Insert the total reconstruction pole associated with the plate pair moving_plate_id and fixed_plate_id plate.
build_reconstruction_tree(anchor_plate_id, reconstruction_time)

Builds a ReconstructionTree from the total reconstruction poles inserted via insert_total_reconstruction_pole().

Parameters: anchor_plate_id (int) – the anchored plate id of the reconstruction tree reconstruction_time (float or GeoTimeInstant) – the reconstruction time of all the total reconstruction poles inserted InterpolationError if reconstruction_time is distant past or distant future

The top (root) of the tree is the plate anchor_plate_id. The total reconstruction poles inserted via insert_total_reconstruction_pole() are all assumed to be for the time reconstruction_time - although this is not checked.

NOTE: This method resets the state of this ReconstructionTreeBuilder to where it was before any calls to insert_total_reconstruction_pole(). So a second call to this method (without any intervening calls to insert_total_reconstruction_pole()) will result in an empty reconstruction tree.

insert_total_reconstruction_pole(fixed_plate_id, moving_plate_id, total_reconstruction_pole)

Insert the total reconstruction pole associated with the plate pair moving_plate_id and fixed_plate_id plate.

Parameters: fixed_plate_id (int) – the fixed plate id of the total reconstruction pole moving_plate_id (int) – the moving plate id of the total reconstruction pole total_reconstruction_pole (FiniteRotation) – the total reconstruction pole

The total reconstruction pole is associated with the reconstruction time of the ReconstructionTree that will be built by build_reconstruction_tree().

A total reconstruction pole can be obtained from a (rotation) feature of type ‘gpml:TotalReconstructionSequence’ and inserted into a reconstruction tree builder:

fixed_plate_id, moving_plate_id, total_reconstruction_pole = rotation_feature.get_total_reconstruction_pole()
interpolated_rotation = total_reconstruction_pole.get_value(reconstruction_time)
if interpolated_rotation:
builder.insert_total_reconstruction_pole(
fixed_plate_id,
moving_plate_id,
interpolated_rotation.get_finite_rotation())


#### Previous topic

pygplates.ReconstructionTree

#### Next topic

pygplates.ReconstructionTreeEdge