Sample code

This document contains sample code that shows pyGPlates solving common plate tectonic problems.

Note

The Getting started section has a Getting Started tutorial as well as an installation guide to help get started.

Import

This section covers how to get geometry data into a state where it can be reconstructed by pyGPlates.

Load/Save

This section covers how to load and save collections of features from/to files.

Create/query features

This section covers how to create features from scratch and how to query their properties.

Reconstruct features

This section covers how to reconstruct regular features, motion path features and flowline features to past geological times.

Rotations

This section covers querying and modifying the rotations that are used to reconstruct features to past geological times.

Topologies

This section covers how to reconstruct (or resolve) dynamic geometries (such as topological plate boundaries) at past geological times, and how to query their topologies.

Velocities

This section covers how to calculate velocities of features as they move through geological time and also how to calculate velocities of plates at non-moving point locations.

Spatial proximity

This section covers queries involving distances between geometries.

Isochrons

This section covers some use cases specific to the isochron feature type.