pygplates.GpmlOldPlatesHeader

class pygplates.GpmlOldPlatesHeader(region_number, reference_number, string_number, geographic_description, plate_id_number, age_of_appearance, age_of_disappearance, data_type_code, data_type_code_number, data_type_code_number_additional, conjugate_plate_id_number, colour_code, number_of_points)

Bases: pygplates.PropertyValue

A property value containing metadata inherited from imported PLATES data files.

__init__(region_number, reference_number, string_number, geographic_description, plate_id_number, age_of_appearance, age_of_disappearance, data_type_code, data_type_code_number, data_type_code_number_additional, conjugate_plate_id_number, colour_code, number_of_points)

Create a property value containing PLATES metadata.

Parameters:
  • region_number (int) – region number
  • reference_number (int) – reference number
  • string_number (int) – string number
  • geographic_description (string) – geographic description
  • plate_id_number (float) – plate id number
  • age_of_appearance (float) – age of appearance
  • age_of_disappearance (int) – age of disappearance
  • data_type_code (string) – data type code
  • data_type_code_number (int) – data type code number
  • data_type_code_number_additional (string) – data type code number additional
  • conjugate_plate_id_number (int) – conjugate plate id number
  • colour_code (int) – colour code
  • number_of_points (int) – number of points - not counting the final ‘terminator’ point (99.0000,99.0000)

Methods

__init__(region_number, reference_number, ...) Create a property value containing PLATES metadata.
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_age_of_appearance() Returns the age of appearance.
get_age_of_disappearance() Returns the age of disappearance.
get_colour_code() Returns the colour code.
get_conjugate_plate_id_number() Returns the conjugate plate id number.
get_data_type_code() Returns the data type code.
get_data_type_code_number() Returns the data type code number.
get_data_type_code_number_additional() Returns the data type code number additional.
get_geographic_description() Returns the geographic description.
get_geometry() Extracts the geometry if this property value contains a geometry.
get_number_of_points() Returns the number of points.
get_plate_id_number() Returns the plate id number.
get_reference_number() Returns the reference number.
get_region_number() Returns the region number.
get_string_number() Returns the string number.
get_value([time=0]) Extracts the value, of this possibly time-dependent property value, at the reconstruction time.
set_age_of_appearance(age_of_appearance) Sets the age of appearance.
set_age_of_disappearance(age_of_disappearance) Sets the age of disappearance.
set_colour_code(colour_code) Sets the colour code.
set_conjugate_plate_id_number(...) Sets the conjugate plate id number.
set_data_type_code(data_type_code) Sets the data type code.
set_data_type_code_number(data_type_code_number) Sets the data type code number.
set_data_type_code_number_additional(...) Sets the data type code number additional.
set_geographic_description(...) Sets the geographic description.
set_number_of_points(number_of_points) Sets the number of points.
set_plate_id_number(plate_id_number) Sets the plate id number.
set_reference_number(reference_number) Sets the reference number.
set_region_number(region_number) Sets the region number.
set_string_number(string_number) Sets the string number.
accept_visitor(visitor)

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
clone()

Create a duplicate of this property value (derived) instance, including a recursive copy of any nested property values that this instance might contain.

Return type:PropertyValue
get_age_of_appearance()

Returns the age of appearance.

Return type:float
get_age_of_disappearance()

Returns the age of disappearance.

Return type:float
get_colour_code()

Returns the colour code.

Return type:int
get_conjugate_plate_id_number()

Returns the conjugate plate id number.

Return type:int
get_data_type_code()

Returns the data type code.

Return type:string
get_data_type_code_number()

Returns the data type code number.

Return type:int
get_data_type_code_number_additional()

Returns the data type code number additional.

Return type:string
get_geographic_description()

Returns the geographic description.

Return type:string
get_geometry()

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)
get_number_of_points()

Returns the number of points.

Return type:int
get_plate_id_number()

Returns the plate id number.

Return type:int
get_reference_number()

Returns the reference number.

Return type:int
get_region_number()

Returns the region number.

Return type:int
get_string_number()

Returns the string number.

Return type:int
get_value([time=0])

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()
set_age_of_appearance(age_of_appearance)

Sets the age of appearance.

Parameters:age_of_appearance (float) – age of appearance
set_age_of_disappearance(age_of_disappearance)

Sets the age of disappearance.

Parameters:age_of_disappearance (float) – age of disappearance
set_colour_code(colour_code)

Sets the colour code.

Parameters:colour_code (int) – colour code
set_conjugate_plate_id_number(conjugate_plate_id_number)

Sets the conjugate plate id number.

Parameters:conjugate_plate_id_number (int) – conjugate plate id number
set_data_type_code(data_type_code)

Sets the data type code.

Parameters:data_type_code (string) – data type code
set_data_type_code_number(data_type_code_number)

Sets the data type code number.

Parameters:data_type_code_number (int) – data type code number
set_data_type_code_number_additional(data_type_code_number_additional)

Sets the data type code number additional.

Parameters:data_type_code_number_additional (string) – data type code number additional
set_geographic_description(geographic_description)

Sets the geographic description.

Parameters:geographic_description (string) – geographic description
set_number_of_points(number_of_points)

Sets the number of points.

Parameters:number_of_points (int) – number of points
set_plate_id_number(plate_id_number)

Sets the plate id number.

Parameters:plate_id_number (int) – plate id number
set_reference_number(reference_number)

Sets the reference number.

Parameters:reference_number (int) – reference number
set_region_number(region_number)

Sets the region number.

Parameters:region_number (int) – region number
set_string_number(string_number)

Sets the string number.

Parameters:string_number (int) – string number

Previous topic

pygplates.GpmlKeyValueDictionary

Next topic

pygplates.GpmlPlateId

This Page