QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Handles storage of information regarding WKB types and their properties. More...
#include <qgswkbtypes.h>
Static Public Member Functions | |
static Qgis::WkbType | addM (Qgis::WkbType type) |
Adds the m dimension to a WKB type and returns the new type. | |
static Qgis::WkbType | addZ (Qgis::WkbType type) |
Adds the z dimension to a WKB type and returns the new type. | |
static int | coordDimensions (Qgis::WkbType type) |
Returns the coordinate dimension of the geometry type as an integer. | |
static Qgis::WkbType | curveType (Qgis::WkbType type) |
Returns the curve type for a WKB type. | |
static QString | displayString (Qgis::WkbType type) |
Returns a non-translated display string type for a WKB type, e.g., the geometry name used in WKT geometry representations. | |
static Qgis::WkbType | dropM (Qgis::WkbType type) |
Drops the m dimension (if present) for a WKB type and returns the new type. | |
static Qgis::WkbType | dropZ (Qgis::WkbType type) |
Drops the z dimension (if present) for a WKB type and returns the new type. | |
static Qgis::WkbType | flatType (Qgis::WkbType type) |
Returns the flat type for a WKB type. | |
static QString | geometryDisplayString (Qgis::GeometryType type) |
Returns a display string for a geometry type. | |
static Qgis::GeometryType | geometryType (Qgis::WkbType type) |
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a PolygonGeometry geometry type. | |
static bool | hasM (Qgis::WkbType type) |
Tests whether a WKB type contains m values. | |
static bool | hasZ (Qgis::WkbType type) |
Tests whether a WKB type contains the z-dimension. | |
static bool | isCurvedType (Qgis::WkbType type) |
Returns true if the WKB type is a curved type or can contain curved geometries. | |
static bool | isMultiType (Qgis::WkbType type) |
Returns true if the WKB type is a multi type. | |
static bool | isSingleType (Qgis::WkbType type) |
Returns true if the WKB type is a single type. | |
static Qgis::WkbType | linearType (Qgis::WkbType type) |
Returns the linear type for a WKB type. | |
static Qgis::WkbType | multiType (Qgis::WkbType type) |
Returns the multi type for a WKB type. | |
static Qgis::WkbType | parseType (const QString &wktStr) |
Attempts to extract the WKB type from a WKT string. | |
static Qgis::WkbType | promoteNonPointTypesToMulti (Qgis::WkbType type) |
Promotes a WKB geometry type to its multi-type equivalent, with the exception of point geometry types. | |
static Qgis::WkbType | singleType (Qgis::WkbType type) |
Returns the single type for a WKB type. | |
static Qgis::WkbType | to25D (Qgis::WkbType type) |
Will convert the 25D version of the flat type if supported or Unknown if not supported. | |
static QString | translatedDisplayString (Qgis::WkbType type) |
Returns a translated display string type for a WKB type, e.g., the geometry name used in WKT geometry representations. | |
static int | wkbDimensions (Qgis::WkbType type) |
Returns the inherent dimension of the geometry type as an integer. | |
static Qgis::WkbType | zmType (Qgis::WkbType type, bool hasZ, bool hasM) |
Returns the modified input geometry type according to hasZ / hasM. | |
Handles storage of information regarding WKB types and their properties.
Definition at line 41 of file qgswkbtypes.h.
|
inlinestatic |
Adds the m dimension to a WKB type and returns the new type.
type | original type |
Definition at line 1171 of file qgswkbtypes.h.
|
inlinestatic |
Adds the z dimension to a WKB type and returns the new type.
type | original type |
Definition at line 1147 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 912 of file qgswkbtypes.h.
|
inlinestatic |
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 404 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 156 of file qgswkbtypes.cpp.
|
inlinestatic |
Drops the m dimension (if present) for a WKB type and returns the new type.
type | original type |
Definition at line 1223 of file qgswkbtypes.h.
|
inlinestatic |
Drops the z dimension (if present) for a WKB type and returns the new type.
type | original type |
Definition at line 1206 of file qgswkbtypes.h.
|
inlinestatic |
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 671 of file qgswkbtypes.h.
|
static |
Returns a display string for a geometry type.
This will return one of the following strings:
Definition at line 242 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 Qgis::GeometryType::Unknown.
Definition at line 925 of file qgswkbtypes.h.
|
inlinestatic |
Tests whether a WKB type contains m values.
true
if type has m values Definition at line 1098 of file qgswkbtypes.h.
|
inlinestatic |
Tests whether a WKB type contains the z-dimension.
true
if type has z values Definition at line 1044 of file qgswkbtypes.h.
|
inlinestatic |
Returns true
if the WKB type is a curved type or can contain curved geometries.
Definition at line 869 of file qgswkbtypes.h.
|
inlinestatic |
Returns true
if the WKB type is a multi type.
Definition at line 813 of file qgswkbtypes.h.
|
inlinestatic |
Returns true
if the WKB type is a single type.
Definition at line 803 of file qgswkbtypes.h.
|
inlinestatic |
Returns the linear type for a WKB type.
For example, for a CompoundCurve, the linear type would be LineString.
Definition at line 553 of file qgswkbtypes.h.
|
inlinestatic |
Returns the multi type for a WKB type.
For example, for Polygon WKB types the multi type would be MultiPolygon.
Definition at line 220 of file qgswkbtypes.h.
|
static |
Attempts to extract the WKB type from a WKT string.
wktStr | a valid WKT string |
|
inlinestatic |
Promotes a WKB geometry type to its multi-type equivalent, with the exception of point geometry types.
Specifically, this method should be used to determine the most-permissive possible resultant WKB type which can result from subtracting parts of a geometry. A single-point geometry type can never become a multi-point geometry type as a result of a subtraction, but a single-line or single-polygon geometry CAN become a multipart geometry as a result of subtracting portions of the geometry.
Definition at line 374 of file qgswkbtypes.h.
|
inlinestatic |
Returns the single type for a WKB type.
For example, for MultiPolygon WKB types the single type would be Polygon.
Definition at line 53 of file qgswkbtypes.h.
|
inlinestatic |
Will convert the 25D version of the flat type if supported or Unknown if not supported.
type | The type to convert |
Definition at line 1239 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 166 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 892 of file qgswkbtypes.h.
|
inlinestatic |
Returns the modified input geometry type according to hasZ / hasM.
Definition at line 782 of file qgswkbtypes.h.