Create a polarity chron id property value.
InformationModelError if verify_information_model is VerifyInformationModel.yes and era is not a recognised era value
# Create the identifier 'C34ad' for Cenozoic isochron, major region 34, sub region a, sub region d: polarity_chron_id_property = pygplates.GpmlPolarityChronId('Cenozoic', 34, 'ad')
|__init__([era], [major_region], ...)||Create a polarity chron id property value.|
|accept_visitor(visitor)||Accept a property value visitor so that it can visit this property value.|
|clone()||Create a duplicate of this property value (derived) instance, including a recursive copy of any nested property values that this instance might contain.|
|get_era()||Returns the era.|
|get_geometry()||Extracts the geometry if this property value contains a geometry.|
|get_major_region()||Returns the major region.|
|get_minor_region()||Returns the minor region.|
|get_value([time=0])||Extracts the value, of this possibly time-dependent property value, at the reconstruction time.|
|set_era(era, ...)||Sets the era.|
|set_major_region(major_region)||Sets the major region.|
|set_minor_region(minor_region)||Sets the minor region.|
Accept a property value visitor so that it can visit this property value. As part of the visitor pattern, this enables the visitor instance to discover the derived class type of this property. Note that there is no common interface shared by all property value types, hence the visitor pattern provides one way to find out which type of property value is being visited.
|Parameters:||visitor (PropertyValueVisitor) – the visitor instance visiting this property value|
Create a duplicate of this property value (derived) instance, including a recursive copy of any nested property values that this instance might contain.
Returns the era.
|Returns:||the era, or None if the era was not initialised|
|Return type:||string or None|
Extracts the geometry if this property value contains a geometry.
|Return type:||GeometryOnSphere or None|
This function searches for a geometry in the following standard geometry property value types:
If this property value does not contain a geometry then None is returned.
Time-dependent geometry properties are not yet supported, so the only time-dependent property value wrapper currently supported by this function is GpmlConstantValue.
To extract geometry from a specific feature property:
property_value = feature.get_value(pygplates.PropertyName.gpml_pole_position) if property_value: geometry = property_value.get_geometry()
...however Feature.get_geometry() provides an easier way to extract geometry from a feature with:
geometry = feature.get_geometry(pygplates.PropertyName.gpml_pole_position)
To extract all geometries from a feature (regardless of which properties they came from):
all_geometries =  for property in feature: property_value = property.get_value() if property_value: geometry = property_value.get_geometry() if geometry: all_geometries.append(geometry)
...however again Feature.get_geometry() does this more easily with:
all_geometries = feature.get_geometry(lambda property: True, pygplates.PropertyReturn.all)
Returns the major region.
|Returns:||the major region, or None if the major region was not initialised|
|Return type:||int or None|
Returns the minor region.
|Returns:||the minor region, or None if the minor region was not initialised|
|Return type:||string or None|
Extracts the value, of this possibly time-dependent property value, at the reconstruction time.
|Parameters:||time (float or GeoTimeInstant) – the time to extract value (defaults to present day)|
|Return type:||PropertyValue or None|
If this property value is a time-dependent property (GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation) then a nested property value is extracted at the reconstruction time and returned. Otherwise this property value instance is simply returned as is (since it’s not a time-dependent property value).
Returns None if this property value is a time-dependent property (GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation) and time is outside its time range (of time samples or time windows).
Note that if this property value is a GpmlIrregularSampling instance then the extracted property value is interpolated (at reconstruction time) if property value can be interpolated (currently only GpmlFiniteRotation and XsDouble), otherwise None is returned.
The following example demonstrates extracting an interpolated finite rotation from a total reconstruction pole at time 20Ma:
gpml_finite_rotation_20Ma = total_reconstruction_pole.get_value(20) if gpml_finite_rotation_20Ma: print 'Interpolated finite rotation at 20Ma: %s' % gpml_finite_rotation_20Ma.get_finite_rotation()
Sets the era.
InformationModelError if verify_information_model is VerifyInformationModel.yes and era is not a recognised era string value
Sets the major region.
|Parameters:||major_region (int) – the number indicating the major region the chron is in - Cenozoic isochrons have been classified into broad regions identified by the numbers 1 to 34, Mesozoic isochrons use the numbers 1 to 29|
Sets the minor region.
|Parameters:||minor_region (string) – the sequence of letters indicating the sub-region the chron is located in - the letters a-z are used for the initial sub-region, and if further polarity reversals have been discovered within that chron, a second letter is appended, and so on|