# Reference¶

This document lists the Python functions and classes that make up the GPlates Python Application Programming Interface (API) known as pyGPlates.

Note

Please see the installation section for information on how to install pyGPlates.

Note

Please see the tutorial section to help get you started using pyGPlates.

## Reconstruction¶

Functions to reconstruct backward and forward in time:

 pygplates.reconstruct(…) Reconstruct regular geological features, motion paths or flowlines to a specific geological time. pygplates.reverse_reconstruct(…) Reverse reconstruct geological features from a specific geological time.

Classes resulting from reconstructing regular features at a particular reconstruction time.

 pygplates.ReconstructedFeatureGeometry The geometry of a feature reconstructed to a geological time. pygplates.ReconstructedFlowline The reconstructed history of plate motion away from a spreading ridge in the form of a path of points over geological time. pygplates.ReconstructedMotionPath The reconstructed history of a plate’s motion in the form of a path of points over geological time.

All three above reconstructed feature types inherit from:

 pygplates.ReconstructionGeometry The base class inherited by all derived reconstruction geometry classes.

## Topology¶

Functions to resolve topologies:

 pygplates.resolve_topologies(…) Resolve topological features (lines, boundaries and networks) to a specific geological time.

Classes resulting from resolving topological features at a particular reconstruction time.

 pygplates.ResolvedTopologicalLine The geometry of a topological line feature resolved to a geological time. pygplates.ResolvedTopologicalBoundary The geometry of a topological boundary feature resolved to a geological time. pygplates.ResolvedTopologicalNetwork The geometry of a topological network feature resolved to a geological time.

All three above resolved topology types inherit from:

 pygplates.ReconstructionGeometry The base class inherited by all derived reconstruction geometry classes.

The following class represents a sub-segment of a single resolved topological line, boundary or network.

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

The following classes represent sub-segments shared by one or more resolved topological boundaries and/or networks.

 pygplates.ResolvedTopologicalSection The sequence of shared sub-segments of a reconstructed topological section that uniquely contribute to the boundaries of one or more resolved topologies. pygplates.ResolvedTopologicalSharedSubSegment The shared subset of vertices of a reconstructed topological section that uniquely contribute to the boundaries of one or more resolved topologies.

## Velocity¶

Functions to calculate velocities:

 pygplates.calculate_velocities(…) Calculate velocities at a sequence of points assuming movement due to a finite rotation over a time interval.

## Rotation¶

RotationModel is the main class for getting finite and stage rotations from rotation models/files.
FiniteRotation is a useful maths class for rotating geometries (and vectors).
 pygplates.RotationModel Query a finite rotation of a moving plate relative to any other plate, optionally between two instants in geological time. pygplates.FiniteRotation Represents the motion of plates on the surface of the globe.

Note

ReconstructionTreeEdge is only needed for very advanced scenarios.

 pygplates.ReconstructionTree Represents the plate-reconstruction hierarchy of total reconstruction poles at an instant in geological time. pygplates.ReconstructionTreeEdge A reconstruction tree edge represents a moving/fixed plate pair in the graph of the plate-reconstruction hierarchy.

Functions to find and fix finite rotation crossovers (transitions of fixed plate):

 pygplates.find_crossovers(rotation_features, …) Find crossovers in rotation features. pygplates.synchronise_crossovers(…) Synchronise crossovers in rotation features.

## Plate Partitioning¶

Functions to partition into plates:

 pygplates.partition_into_plates(…) Partition features into plates.

Classes to partition into plates:

 pygplates.PlatePartitioner Partition features or geometries into plates.

## File I/O¶

Classes that read/write data from/to files:

 pygplates.FeatureCollection The feature collection aggregates a set of features into a collection. pygplates.FeatureCollectionFileFormatRegistry Reads and writes feature collections from/to various feature collection file formats.

Note

FeatureCollection is easier to use for reading and writing.

## Feature¶

Feature is the main class to go to for querying/setting geological feature properties.

 pygplates.Feature The feature is an abstract model of some geological or plate-tectonic object or concept of interest defined by the GPlates Geological Information Model (GPGIM).A feature consists of a collection of properties, a feature type and a feature id.. pygplates.FeatureCollection The feature collection aggregates a set of features into a collection.

## Feature property¶

A feature is essentially a list of properties where each property has a name and a value.

Note

PropertyValueVisitor is only needed for very advanced scenarios.

 pygplates.Property Associates a property name with a property value. pygplates.PropertyName The namespace-qualified name of a property. pygplates.PropertyValue The base class inherited by all derived property value classes. pygplates.PropertyValueVisitor The base class inherited by all derived property value visitor classes.

## Feature property value¶

These classes represent the various types of property values that a feature can contain.
Property values contain things such as plate IDs, geometries, finite rotations, strings, numbers, etc. All these property values inherit from PropertyValue.

Note

Some of these property values can be obtained more easily using Feature directly.

 pygplates.Enumeration A property value that represents a finite set of accepted (string) values per enumeration type. pygplates.GmlDataBlock A data block that associates each scalar type with a sequence of floating-point scalar values. pygplates.GmlLineString A property value representing a polyline geometry. pygplates.GmlMultiPoint A property value representing a multi-point geometry. pygplates.GmlOrientableCurve A property value representing a polyline geometry with a positive or negative orientation. pygplates.GmlPoint A property value representing a point geometry. pygplates.GmlPolygon A property value representing a polygon geometry. pygplates.GmlTimeInstant A property value representing an instant in geological time. pygplates.GmlTimePeriod A property value representing a period in geological time (time of appearance to time of disappearance). pygplates.GpmlArray A sequence of property value elements. pygplates.GpmlFiniteRotation A property value that represents a finite rotation. pygplates.GpmlKeyValueDictionary A dictionary of key/value pairs that associates string keys with integer, float or string values. pygplates.GpmlOldPlatesHeader A property value containing metadata inherited from imported PLATES data files. pygplates.GpmlPlateId A property value that represents a plate id. pygplates.GpmlPolarityChronId A property value that identifies an Isochron or MagneticAnomalyIdentification. pygplates.XsBoolean A property value that represents a boolean value. pygplates.XsDouble A property value that represents a double-precision floating-point number. pygplates.XsInteger A property value that represents an integer number. pygplates.XsString A property value that represents a string.

The following subset of property value classes represent topological lines, polygons and networks.

 pygplates.GpmlTopologicalLine A topological line geometry that is resolved from topological sections. pygplates.GpmlTopologicalPolygon A topological polygon geometry that is resolved from topological sections. pygplates.GpmlTopologicalNetwork A topological deforming network that is resolved from boundary topological sections and interior geometries.

The following subset of property value classes represent the topological sections that topologies are created from.

 pygplates.GpmlTopologicalSection The base class inherited by all derived topological section property value classes. pygplates.GpmlTopologicalPoint A topological section referencing a point geometry. pygplates.GpmlTopologicalLineSection A topological section referencing a line geometry. pygplates.GpmlPropertyDelegate A property value that represents a reference, or delegation, to a property in another feature.

The following subset of property value classes are time-dependent wrappers. These are what enable the above property values to vary over geological time.

Note

There is currently limited support for time-dependent properties.

 pygplates.GpmlConstantValue The most basic case of a time-dependent property value is one that is constant for all time. The other two types are GpmlIrregularSampling and GpmlPiecewiseAggregation. The GPlates Geological Information Model (GPGIM) defines those properties that are time-dependent (see http://www.gplates.org/gpml.html) and those that are not. For example, a GpmlPlateId property value is used in gpml:reconstructionPlateId properties, of general feature types, and also in gpml:relativePlate properties of motion path features. In the former case it is expected to be wrapped in a GpmlConstantValue while in the latter case it is not. pygplates.GpmlIrregularSampling A time-dependent property consisting of a sequence of time samples irregularly spaced in time. pygplates.GpmlPiecewiseAggregation A time-dependent property consisting of a sequence of time windows each with a constant property value.

The following support classes are closed related to property values (but are not actual property values).

 pygplates.GpmlPropertyDelegateList A list of GpmlPropertyDelegate instances. pygplates.GpmlTimeSample A time sample associates an arbitrary property value with a specific time instant. pygplates.GpmlTimeSampleList A list of GpmlTimeSample instances. pygplates.GpmlTimeWindow A time window associates an arbitrary property value with a specific time period. pygplates.GpmlTimeWindowList A list of GpmlTimeWindow instances. pygplates.GpmlTopologicalSectionList A list of GpmlTopologicalSection instances.

## Geometry¶

There are four types of geometry:

 pygplates.PointOnSphere Represents a point on the surface of the unit length sphere in 3D cartesian coordinates. pygplates.MultiPointOnSphere Represents a multi-point (collection of points) on the surface of the unit length sphere. pygplates.PolylineOnSphere Represents a polyline on the surface of the unit length sphere. pygplates.PolygonOnSphere Represents a polygon on the surface of the unit length sphere.

All four above geometry types inherit from:

 pygplates.GeometryOnSphere The base class inherited by all derived classes representing geometries on the sphere.

A polyline or a polygon is both a sequence of points and a sequence of segments (between adjacent points). Each segment is a great circle arc:

 pygplates.GreatCircleArc A great-circle arc on the surface of the unit globe.

There is also a latitude/longitude version of a point:

 pygplates.LatLonPoint Represents a point in 2D geographic coordinates (latitude and longitude).

## Vector¶

A vector class, and conversions between global cartesian and local magnitude/azimuth/inclination:

 pygplates.LocalCartesian A local cartesian coordinate system located at a point on the sphere. pygplates.Vector3D Represents a vector in 3D cartesian coordinates.

## String¶

String-type classes used in various areas of pyGPlates:

 pygplates.EnumerationType The namespace-qualified type of an enumeration. pygplates.FeatureId A feature ID acts as a persistent unique identifier for a feature. pygplates.FeatureType The namespace-qualified type of a feature. pygplates.PropertyName The namespace-qualified name of a property. pygplates.ScalarType The namespace-qualified type of scalar values.

## Utility¶

General utility classes:

 pygplates.DateLineWrapper Wraps geometries to the dateline. pygplates.Earth Various Earth-related parameters (such as radius). pygplates.FeaturesFunctionArgument A utility class for extracting features from collections and files. pygplates.GeoTimeInstant Represents an instant in geological time. pygplates.Version A version of pyGPlates (GPlates Python API).