pygplates.FeatureType
- class pygplates.FeatureType
Bases:
instance
The namespace-qualified type of a feature.
All comparison operators (==, !=, <, <=, >, >=) are supported. FeatureType is hashable (can be used as a key in a
dict
).The default feature type for
Feature()
ispygplates.FeatureType.gpml_unclassified_feature
(which is the same aspygplates.FeatureType.create_gpml('UnclassifiedFeature')
).As a convenience the following common feature types are available as class attributes:
A FeatureType can also be pickled.
Changed in version 0.42: Added pickle support.
- __init__()
You cannot directly instantiate this class from Python.
Note
This constructor is only provided for pickle support.
Methods
You cannot directly instantiate this class from Python.
[staticmethod] Creates a
FeatureType
instance from a fully qualified name string.create_gpml
(name)[staticmethod] Create a feature type qualified with the
gpml:
prefix (gpml:
+name
).Returns the default geometry property name associated with this feature type.
get_name
()Returns the unqualified name.
Returns the namespace URI.
Returns the namespace alias.
Returns the fully qualified name.
Attributes
gpml_aseismic_ridge
gpml_basic_rock_unit
gpml_basin
gpml_closed_continental_boundary
gpml_closed_plate_boundary
gpml_coastline
gpml_continental_crust
gpml_continental_fragment
gpml_continental_rift
gpml_craton
gpml_extended_continental_crust
gpml_fault
gpml_flowline
gpml_fold_plane
gpml_fracture_zone
gpml_fracture_zone_identification
gpml_geological_lineation
gpml_geological_plane
gpml_hot_spot
gpml_hot_spot_trail
gpml_inferred_paleo_boundary
gpml_island_arc
gpml_isochron
gpml_large_igneous_province
gpml_magnetic_anomaly_identification
gpml_magnetic_anomaly_lineation
gpml_magnetic_anomaly_ship_track
gpml_mid_ocean_ridge
gpml_motion_path
gpml_oceanic_crust
gpml_ophiolite
gpml_orogenic_belt
gpml_passive_continental_boundary
gpml_pluton
gpml_pseudo_fault
gpml_seamount
gpml_slab_edge
gpml_subduction_zone
gpml_suture
gpml_terrane_boundary
gpml_topological_closed_plate_boundary
gpml_topological_network
gpml_topological_slab_boundary
gpml_total_reconstruction_sequence
gpml_transform
gpml_transitional_crust
gpml_unclassified_feature
gpml_unconformity
gpml_unknown_contact
gpml_virtual_geomagnetic_pole
gpml_volcano
- static create_from_qualified_string(name)
[staticmethod] Creates a
FeatureType
instance from a fully qualified name string.- Parameters:
name (string) – qualified name
- Return type:
FeatureType
or None
The name string should have a
:
character separating the namespace alias from the unqualified name, for examplegpml:Coastline
. If the namespace alias is not recognised (asgpml
,gml
orxsi
) thengpml
is assumed.An over-qualified name string (eg, containing two or more
:
characters) will result inNone
being returned.feature_type = pygplates.FeatureType.create_from_qualified_string('gpml:Coastline')
- static create_gpml(name)
[staticmethod] Create a feature type qualified with the
gpml:
prefix (gpml:
+name
).- Parameters:
name (string) – unqualified name
- Return type:
gpml_coastline_feature_type = pygplates.FeatureType.create_gpml('Coastline')
- get_default_geometry_property_name()
Returns the default geometry property name associated with this feature type.
Usually a feature type supports geometry properties with more than one property name. For example, a coastline feature supports both a pygplates.PropertyName.gpml_center_line_of geometry and a pygplates.PropertyName.gpml_unclassified_geometry) geometry. But only one of them is the default (the default property that geometry data is imported into the feature). You can see which is the default by reading the
Default Geometry Property
label in the coastline feature model.- Return type:
PropertyName
or None
Note
This can return None if this feature type represents an abstract feature class (ie, those feature classes tagged “Class Type: abstract” in the GPGIM).
Added in version 0.43.
- get_name()
Returns the unqualified name.
- Return type:
string
This is the fully qualified name minus the
gpml:
prefix (if created with create_gpml()).For example,
Coastline
.
- get_namespace()
Returns the namespace URI.
- Return type:
string
For example, the
gpml
namespace alias has the namespacehttp://www.gplates.org/gplates
.
- get_namespace_alias()
Returns the namespace alias.
- Return type:
string
For example,
gpml
(if created with create_gpml()).
- to_qualified_string()
Returns the fully qualified name.
- Return type:
string
For example,
gpml:Coastline
.