QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
Handles storage of information regarding WKB types and their properties. More...
#include <qgswkbtypes.h>
Static Public Member Functions | |
static Type | addM (Type type) SIP_HOLDGIL |
Adds the m dimension to a WKB type and returns the new type. More... | |
static Type | addZ (Type type) SIP_HOLDGIL |
Adds the z dimension to a WKB type and returns the new type. More... | |
static int | coordDimensions (Type type) SIP_HOLDGIL |
Returns the coordinate dimension of the geometry type as an integer. More... | |
static Type | curveType (Type type) SIP_HOLDGIL |
Returns the curve type for a WKB type. More... | |
static QString | displayString (Type type) SIP_HOLDGIL |
Returns a non-translated display string type for a WKB type, e.g., the geometry name used in WKT geometry representations. More... | |
static Type | dropM (Type type) SIP_HOLDGIL |
Drops the m dimension (if present) for a WKB type and returns the new type. More... | |
static Type | dropZ (Type type) SIP_HOLDGIL |
Drops the z dimension (if present) for a WKB type and returns the new type. More... | |
static Type | flatType (Type type) SIP_HOLDGIL |
Returns the flat type for a WKB type. More... | |
static QString | geometryDisplayString (GeometryType type) SIP_HOLDGIL |
Returns a display string for a geometry type. More... | |
static GeometryType | geometryType (Type type) SIP_HOLDGIL |
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a PolygonGeometry geometry type. More... | |
static bool | hasM (Type type) SIP_HOLDGIL |
Tests whether a WKB type contains m values. More... | |
static bool | hasZ (Type type) SIP_HOLDGIL |
Tests whether a WKB type contains the z-dimension. More... | |
static bool | isCurvedType (Type type) SIP_HOLDGIL |
Returns true if the WKB type is a curved type or can contain curved geometries. More... | |
static bool | isMultiType (Type type) SIP_HOLDGIL |
Returns true if the WKB type is a multi type. More... | |
static bool | isSingleType (Type type) SIP_HOLDGIL |
Returns true if the WKB type is a single type. More... | |
static Type | linearType (Type type) SIP_HOLDGIL |
Returns the linear type for a WKB type. More... | |
static Type | multiType (Type type) SIP_HOLDGIL |
Returns the multi type for a WKB type. More... | |
static Type | parseType (const QString &wktStr) |
Attempts to extract the WKB type from a WKT string. More... | |
static Type | singleType (Type type) SIP_HOLDGIL |
Returns the single type for a WKB type. More... | |
static Type | to25D (Type type) SIP_HOLDGIL |
Will convert the 25D version of the flat type if supported or Unknown if not supported. More... | |
static QString | translatedDisplayString (Type type) SIP_HOLDGIL |
Returns a translated display string type for a WKB type, e.g., the geometry name used in WKT geometry representations. More... | |
static int | wkbDimensions (Type type) SIP_HOLDGIL |
Returns the inherent dimension of the geometry type as an integer. More... | |
static Type | zmType (Type type, bool hasZ, bool hasM) SIP_HOLDGIL |
Returns the modified input geometry type according to hasZ / hasM. More... | |
Handles storage of information regarding WKB types and their properties.
Definition at line 41 of file qgswkbtypes.h.
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Enumerator | |
---|---|
PointGeometry | |
LineGeometry | |
PolygonGeometry | |
UnknownGeometry | |
NullGeometry |
Definition at line 140 of file qgswkbtypes.h.
enum QgsWkbTypes::Type |
The WKB type describes the number of dimensions a geometry has.
as well as the number of dimensions for each individual vertex
it also has values for multi types, collections, unknown geometry, null geometry, no geometry and curve support.
These classes of geometry are often used for data sources to communicate what kind of geometry should be expected for a given geometry field. It is also used for tools or algorithms to decide if they should be available for a given geometry type or act in a different mode.
Definition at line 69 of file qgswkbtypes.h.
Adds the m dimension to a WKB type and returns the new type.
type | original type |
Definition at line 1171 of file qgswkbtypes.h.
Adds the z dimension to a WKB type and returns the new type.
type | original type |
Definition at line 1146 of file qgswkbtypes.h.
|
inlinestatic |
Returns the coordinate dimension of the geometry type as an integer.
Returned value will be between 2-4, depending on whether the geometry type contains the Z or M dimensions. Invalid geometry types will return a dimension of 0.
Definition at line 925 of file qgswkbtypes.h.
Returns the curve type for a WKB type.
For example, for Polygon WKB types the curve type would be CurvePolygon.
CompoundCurve
for CircularString
(and its Z/M variants)Definition at line 451 of file qgswkbtypes.h.
|
static |
Returns a non-translated display string type for a WKB type, e.g., the geometry name used in WKT geometry representations.
Definition at line 145 of file qgswkbtypes.cpp.
Drops the m dimension (if present) for a WKB type and returns the new type.
type | original type |
Definition at line 1225 of file qgswkbtypes.h.
Drops the z dimension (if present) for a WKB type and returns the new type.
type | original type |
Definition at line 1207 of file qgswkbtypes.h.
Returns the flat type for a WKB type.
This is the WKB type minus any Z or M dimensions. For example, for PolygonZM WKB types the single type would be Polygon.
Definition at line 702 of file qgswkbtypes.h.
|
static |
Returns a display string for a geometry type.
This will return one of the following strings:
Definition at line 223 of file qgswkbtypes.cpp.
|
inlinestatic |
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a PolygonGeometry geometry type.
GeometryCollections are reported as QgsWkbTypes::UnknownGeometry.
Definition at line 938 of file qgswkbtypes.h.
|
inlinestatic |
Tests whether a WKB type contains m values.
true
if type has m values Definition at line 1100 of file qgswkbtypes.h.
|
inlinestatic |
Tests whether a WKB type contains the z-dimension.
true
if type has z values Definition at line 1050 of file qgswkbtypes.h.
|
inlinestatic |
Returns true
if the WKB type is a curved type or can contain curved geometries.
Definition at line 881 of file qgswkbtypes.h.
|
inlinestatic |
Returns true
if the WKB type is a multi type.
Definition at line 832 of file qgswkbtypes.h.
|
inlinestatic |
Returns true
if the WKB type is a single type.
Definition at line 822 of file qgswkbtypes.h.
Returns the linear type for a WKB type.
For example, for a CompoundCurve, the linear type would be LineString.
Definition at line 592 of file qgswkbtypes.h.
Returns the multi type for a WKB type.
For example, for Polygon WKB types the multi type would be MultiPolygon.
Definition at line 302 of file qgswkbtypes.h.
|
static |
Attempts to extract the WKB type from a WKT string.
wktStr | a valid WKT string |
Returns the single type for a WKB type.
For example, for MultiPolygon WKB types the single type would be Polygon.
Definition at line 157 of file qgswkbtypes.h.
Will convert the 25D version of the flat type if supported or Unknown if not supported.
type | The type to convert |
Definition at line 1241 of file qgswkbtypes.h.
|
static |
Returns a translated display string type for a WKB type, e.g., the geometry name used in WKT geometry representations.
Definition at line 155 of file qgswkbtypes.cpp.
|
inlinestatic |
Returns the inherent dimension of the geometry type as an integer.
Returned value will always be less than or equal to the coordinate dimension.
Definition at line 904 of file qgswkbtypes.h.
Returns the modified input geometry type according to hasZ / hasM.
Definition at line 801 of file qgswkbtypes.h.