pygplates.Property

class pygplates.Property

Bases: Boost.Python.instance

Associates a property name with a property value.

Properties are equality (==, !=) comparable (but not hashable - cannot be used as a key in a dict). This includes comparing the property value in the two properties being compared (see PropertyValue) as well as the property name.

__init__(property_name, property_value)

Create a property given a property name and a property value.

Parameters
property = pygplates.Property(property_name, property_value)

Methods

__init__(property_name, property_value)

Create a property given a property name and a property value.

clone()

Create a duplicate of this property instance.

get_name()

Returns the name of the property.

get_time_dependent_container()

Returns the time-dependent property value container.

get_time_dependent_value()

Returns the property value for all times (unlike get_value() which returns for a specific time).

get_value([time=0])

Extracts the value, of our possibly time-dependent property, at the reconstruction time.

clone()

Create a duplicate of this property instance.

Return type

Property

This clones the PropertyName and the PropertyValue.

get_name()

Returns the name of the property.

Return type

PropertyName

get_time_dependent_container()

Returns the time-dependent property value container.

Return type

PropertyValue or None

Returns a time-dependent property value (GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation), or None if the property value is not actually time-dependent.

Deprecated since version 0.21: Use get_time_dependent_value() instead, which differs slightly in that it returns a property value even if it’s not wrapped in a GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation.

get_time_dependent_value()

Returns the property value for all times (unlike get_value() which returns for a specific time).

Return type

PropertyValue

Alternatively you can use get_value() for extracting a contained property value at a specific time.

Note

The returned property value could be a time-dependent property value container (GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation) or just a regular property value.

This method is useful if you want to access the time-dependent property value container directly. An example is visiting the time windows in a GpmlPiecewiseAggregation. Otherwise get_value() is generally more useful since it extracts a value from the container (at a specific time).

New in version 0.21.

get_value([time=0])

Extracts the value, of our possibly time-dependent property, 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 has a time-dependent property value (GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation) then a nested property value is extracted at the reconstruction time and returned. Otherwise our property value instance is simply returned as is (since it’s not a time-dependent property value). See PropertyValue.get_value() for more details.

Note

This method never returns a time-dependent property value (GpmlConstantValue, GpmlIrregularSampling or GpmlPiecewiseAggregation). You can use get_time_dependent_container() for that.