QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Static Public Member Functions | List of all members
QgsMemoryProviderUtils Class Reference

Utility functions for use with the memory vector data provider. More...

#include <qgsmemoryproviderutils.h>

Static Public Member Functions

static QgsVectorLayercreateMemoryLayer (const QString &name, const QgsFields &fields, QgsWkbTypes::Type geometryType=QgsWkbTypes::NoGeometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) SIP_FACTORY
 Creates a new memory layer using the specified parameters. More...
 

Detailed Description

Utility functions for use with the memory vector data provider.

Since
QGIS 3.0

Definition at line 36 of file qgsmemoryproviderutils.h.

Member Function Documentation

◆ createMemoryLayer()

QgsVectorLayer * QgsMemoryProviderUtils::createMemoryLayer ( const QString &  name,
const QgsFields fields,
QgsWkbTypes::Type  geometryType = QgsWkbTypes::NoGeometry,
const QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem() 
)
static

Creates a new memory layer using the specified parameters.

The caller takes responsibility for deleting the newly created layer.

Parameters
namelayer name
fieldsfields for layer
geometryTypeoptional layer geometry type
crsoptional layer CRS for layers with geometry

Definition at line 63 of file qgsmemoryproviderutils.cpp.


The documentation for this class was generated from the following files: