QgsGeometryFactory class
Contains geometry creation routines.
Contents
- Reference
Public static functions
-
static auto createCollectionOfType(QgsWkbTypes::
Type type) -> std::unique_ptr<QgsGeometryCollection> - Returns a new geometry collection matching a specified WKB type.
- static auto fromMultiPointXY(const QgsMultiPointXY& multipoint) -> std::unique_ptr<QgsMultiPoint>
- Construct geometry from a multipoint.
- static auto fromMultiPolygonXY(const QgsMultiPolygonXY& multipoly) -> std::unique_ptr<QgsMultiPolygon>
- Construct geometry from a multipolygon.
- static auto fromMultiPolylineXY(const QgsMultiPolylineXY& multiline) -> std::unique_ptr<QgsMultiLineString>
- Construct geometry from a multipolyline.
- static auto fromPointXY(const QgsPointXY& point) -> std::unique_ptr<QgsAbstractGeometry>
- Construct geometry from a point.
- static auto fromPolygonXY(const QgsPolygonXY& polygon) -> std::unique_ptr<QgsPolygon>
- Construct geometry from a polygon.
- static auto fromPolylineXY(const QgsPolylineXY& polyline) -> std::unique_ptr<QgsAbstractGeometry>
- Construct geometry from a polyline.
- static auto geomFromWkb(QgsConstWkbPtr& wkb) -> std::unique_ptr<QgsAbstractGeometry>
- Construct geometry from a WKB string.
-
static auto geomFromWkbType(QgsWkbTypes::
Type t) -> std::unique_ptr<QgsAbstractGeometry> - Returns empty geometry from wkb type.
- static auto geomFromWkt(const QString& text) -> std::unique_ptr<QgsAbstractGeometry>
- Construct geometry from a WKT string.
Function documentation
static std::unique_ptr<QgsGeometryCollection> QgsGeometryFactory:: createCollectionOfType(QgsWkbTypes:: Type type)
Returns a new geometry collection matching a specified WKB type.
For instance, if type is PolygonM the returned geometry will be a QgsMultiPolygon with M values.
static std::unique_ptr<QgsAbstractGeometry> QgsGeometryFactory:: geomFromWkb(QgsConstWkbPtr& wkb)
Construct geometry from a WKB string.
Updates position of the passed WKB pointer.