QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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, Qgis::WkbType geometryType=Qgis::WkbType::NoGeometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), bool loadDefaultStyle=true) SIP_FACTORY
 Creates a new memory layer using the specified parameters.
 

Detailed Description

Utility functions for use with the memory vector data provider.

Definition at line 35 of file qgsmemoryproviderutils.h.

Member Function Documentation

◆ createMemoryLayer()

QgsVectorLayer * QgsMemoryProviderUtils::createMemoryLayer ( const QString &  name,
const QgsFields fields,
Qgis::WkbType  geometryType = Qgis::WkbType::NoGeometry,
const QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem(),
bool  loadDefaultStyle = true 
)
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
loadDefaultStyleoptional load default style toggle

Definition at line 70 of file qgsmemoryproviderutils.cpp.


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