pygplates.GpmlTopologicalSection¶

class
pygplates.
GpmlTopologicalSection
¶ Bases:
pygplates.PropertyValue
The base class inherited by all derived topological section property value classes.
The list of derived topological section property value classes includes:

New in version 21.

__init__
()¶ Raises an exception This class cannot be instantiated from Python
Methods
__init__
Raises an exception This class cannot be instantiated from Python 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. create
(feature, [geometry_property_name], …)[staticmethod] Create a topological section referencing a feature geometry. create_network_interior
(feature, …)[staticmethod] Create a topological network interior referencing a feature geometry. get_geometry
()Extracts the geometry
if this property value contains a geometry.get_property_delegate
()Returns the property value that references/delegates the source geometry. get_reverse_orientation
()Returns True
if this topological section is aline
and it was reversed when contributing to the parent topology.get_value
([time=0])Extracts the value, of this possibly timedependent property value, at the reconstruction time. 
static
create
(feature[, geometry_property_name][, reverse_order][, topological_geometry_type])¶ [staticmethod] Create a topological section referencing a feature geometry.
Parameters:  feature (
Feature
) – the feature referenced by the returned topological section  geometry_property_name (
PropertyName
, or None) – the optional geometry property name used to find the geometry (topological or nontopological), if not specified then the default geometry property name associated with the feature’stype
is used instead  reverse_order (bool) – whether to reverse the topological section when it’s used to resolve a topological geometry, this is ignored for point sections and only applies to a line section when it does not intersect both its neighbours (when resolving the parent topology)  defaults to False
 topological_geometry_type (
GpmlTopologicalLine
orGpmlTopologicalPolygon
orGpmlTopologicalNetwork
, or None) – optional type of topological geometry that the returned section will be used for (if specified, then used to determine what type of feature geometry can be used as a section)
Return type: GpmlTopologicalSection
(GpmlTopologicalLineSection
orGpmlTopologicalPoint
), or NoneRaises: ValueError if topological_geometry_type is specified but is not one of the accepted types (
GpmlTopologicalLine
orGpmlTopologicalPolygon
orGpmlTopologicalNetwork
)If geometry_property_name is not specified then the default geometry property name is determined from the feature’s
type
 seeFeature.get_geometry()
for more details.A regular polyline or point can be referenced by any topological geometry (topological line, polygon or network). However a topological line can only be referenced by a topological polygon or network.
Note
It’s fine to ignore reverse_order (leave it as the default) since it is not used when resolving the topological geometry provided it intersects both its neighbouring topological sections (in the topological geometry)  which applies only to line sections (not points). When a line section does not intersect both neighbouring sections then its reverse flag determines its orientation when rubberbanding the topology geometry.
Returns
None
if: there is not exactly one geometry (topological or nontopological) property named geometry_property_name (or default) in feature, or
 it’s a regular geometry but it’s not a point or polyline, or
 it’s a regular point/polyline and topological_geometry_type is a topological network but feature is not reconstructable by plate ID or halfstage rotation (the only supported reconstructable types inside the deforming network Delaunay triangulation), or
 it’s a topological polygon or network, or
 it’s a topological line but topological_geometry_type is also a topological line (or not specified)
Create a topological section to be used in a
GpmlTopologicalPolygon
:boundary_sections = [] boundary_section = pygplates.GpmlTopologicalSection.create(referenced_feature, topological_geometry_type=pygplates.GpmlTopologicalPolygon) if boundary_section: boundary_sections.append(boundary_section) ... topological_boundary = pygplates.GpmlTopologicalPolygon(boundary_sections) topological_boundary_feature = pygplates.Feature(pygplates.FeatureType.gpml_topological_closed_plate_boundary) topological_boundary_feature.set_topological_geometry(topological_boundary)
See also
GpmlTopologicalLine.get_sections()
,GpmlTopologicalPolygon.get_boundary_sections()
andGpmlTopologicalNetwork.get_boundary_sections()
New in version 24.
 feature (

static
create_network_interior
(feature[, geometry_property_name])¶ [staticmethod] Create a topological network interior referencing a feature geometry.
Parameters:  feature (
Feature
) – the feature referenced by the returned network interior  geometry_property_name (
PropertyName
, or None) – the optional geometry property name used to find the geometry (topological or nontopological), if not specified then the default geometry property name associated with the feature’stype
is used instead
Return type: GpmlPropertyDelegate
, or NoneIf geometry_property_name is not specified then the default geometry property name is determined from the feature’s
type
 seeFeature.get_geometry()
for more details.Any regular geometry (point, multipoint, polyline, polygon) or topological line can be referenced by a topological network interior.
Note
If a regular polygon geometry is referenced then it will be treated as a rigid interior block in the topological network and will not be part of the deforming region. Anything inside this interior polygon geometry will move rigidly using the plate ID of the referenced feature.
Returns
None
if: there is not exactly one geometry (topological or nontopological) property named geometry_property_name (or default) in feature, or
 it’s a regular geometry but feature is not reconstructable by plate ID or halfstage rotation (the only supported reconstructable types inside the deforming network Delaunay triangulation), or
 it’s a topological polygon or network
Create a topological network interior:
network_interiors = [] network_interior = pygplates.GpmlTopologicalSection.create_network_interior(referenced_interior_feature) if network_interior: network_interiors.append(network_interior) ... network_boundaries = [] network_boundary = pygplates.GpmlTopologicalSection.create(referenced_boundary_feature) if network_boundary: network_boundaries.append(network_boundary) ... topological_network = pygplates.GpmlTopologicalNetwork(network_boundaries, network_interiors) topological_network_feature = pygplates.Feature(pygplates.FeatureType.gpml_topological_network) topological_network_feature.set_topological_geometry(topological_network)
New in version 24.
 feature (

get_property_delegate
()¶ Returns the property value that references/delegates the source geometry.
Return type: GpmlPropertyDelegate