QgsGeometry geom = ...; // initialize QgsGeometry OGRwkbGeometryType wkbType = static_cast(geom.wkbType()); // wkbType is now one of the OGRwkbGeometryType values
QByteArray wkb = ...; // initialize WKB data QgsGeometry geom = QgsGeometry::fromWkb(wkb);
QgsGeometry geom = ...; // initialize QgsGeometry QString geojson = geom.exportToGeoJSON();In these examples, the QGIS API library is used to work with geographic data in C++. The QgsGeometry class provides functions for parsing, creating, and exporting spatial data, while the wkbType property is used to determine the type of a geometry object.