[GPlates-discuss] Reverse reconstruction in pyGPlates

John Cannon john.cannon at sydney.edu.au
Wed May 1 23:40:04 AEST 2019


Hi Ben,

Your approach is currently the way to do this.  That is, first convert the geometry to its present-day position and then reconstruct from there.

This is more complicated than expected because all features in GPlates must contain *present* day geometries (this is essentially a requirement of GPlates/pyGPlates). If we consider GPlates first, then when you create a feature at a past time (such as using a digitization tool) GPlates automatically reverse reconstructs to present day before actually creating the feature. However, in pyGPlates it's possible to directly create a feature with a *non*-present day geometry, and this is what the pygplates.reverse_reconstruct()<https://protect-au.mimecast.com/s/5yUXCK1qJZtOREx8hM-wAb?domain=gplates.org> function is for - to fix this up by making it present-day.

Then, once a feature has a present-day geometry, pygplates.reconstruct()<https://protect-au.mimecast.com/s/5SJJCL7rK8tKzjMNsqcxUk?domain=gplates.org> can reconstruct it to any past geological time.


Here's a slightly easier (but still complicated) way that avoids pygplates.reverse_reconstruct() and instead uses pygplates.Feature.set_geometry()<https://protect-au.mimecast.com/s/9zksCMwvLQTXnOVxuJxA7c?domain=gplates.org> to do the reverse reconstruction...


from_time = 10
to_time = 9
point_at_from_time = ...

rotation_model = pygplates.RotationModel('rotations.rot')

# Find plate ID of the point at the 'from' time.
plate_partitioner_at_from_time = pygplates.PlatePartitioner('static_polygons.gpml', rotation_model, from_time)
polygon_containing_point = plate_partitioner_at_from_time.partition_point(point_at_from_time)
point_plate_id = 0
if polygon_containing_point:
    point_plate_id = polygon_containing_point.get_feature().get_reconstruction_plate_id()

# Create the point feature with a present-day geometry that is reverse reconstructed from the 'from' time to present day.
point_feature = pygplates.Feature()
point_feature.set_reconstruction_plate_id(point_plate_id)
point_feature.set_geometry(
    point_at_from_time,
    reverse_reconstruct=(rotation_model, from_time))

# Reconstruct from present day to the 'to' time.
reconstructed_points = []
pygplates.reconstruct(point_feature, rotation_model, reconstructed_points, to_time)

point_at_to_time = reconstructed_points[0].get_reconstructed_geometry()


I'll look into adding a new reconstruct function with a 'from' and 'to' time that can reconstruct in either direction (backward or forward in time) but does not require creating a pygplates.Feature<https://protect-au.mimecast.com/s/twQrCNLwM9i7gl5VhR7amu?domain=gplates.org> ...


# Reconstruct from the 'from' time to the 'to' time.
points_at_to_time = []
pygplates.reconstruct_geometries(point_at_from_time, rotation_model, points_at_to_time, point_plate_id, to_time, from_time)

point_at_to_time = points_at_to_time[0]

Regards,
John

From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au> On Behalf Of Ben Mather
Sent: Wednesday, 1 May 2019 2:40 PM
To: gplates-discuss at mailman.sydney.edu.au
Subject: [GPlates-discuss] Reverse reconstruction in pyGPlates

Hi team!

This is quite a basic question... Say that I have some point data from 10 Ma that I want to move to 9Ma. Is there a simple way to do this? Currently I create a point feature, assign plate IDs from reconstructed polygons at 10 Ma, use pygplates.reverse_reconstruct to move the points to the present day location, then use pygplates.reconstruct to move them back to 9Ma.

I was expecting that pygplates.reverse_reconstruct would have an optional 'to' argument to accept times other than the present day, or perhaps the Feature class would have a 'set_reconstruction_time' method that would be compatible with the reconstruct function. Is there a suggested workflow for this that I haven't discovered?

Many thanks,
Ben

--
Dr. Ben Mather | Computational Geophysicist
Room 418, Madsen Building F09
School of Geoscience, Faculty of Science
The University of Sydney, NSW 2006
m +61 422 470 117
w benmather.info<https://protect-au.mimecast.com/s/3VSwCOMxNytnBRr5iPHLcB?domain=benmather.info>
t https://protect-au.mimecast.com/s/TH2yCP7yOZtWLGAvsrEIYY?domain=twitter.com<https://protect-au.mimecast.com/s/1KTHCQnzP0tOwA4Bh9y0XM?domain=twitter.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.sydney.edu.au/pipermail/gplates-discuss/attachments/20190501/25f941d2/attachment.html>


More information about the GPlates-discuss mailing list