QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
27 return QStringLiteral(
"integer" );
29 case QVariant::LongLong:
30 return QStringLiteral(
"long" );
32 case QVariant::Double:
33 return QStringLiteral(
"double" );
35 case QVariant::String:
36 return QStringLiteral(
"string" );
39 return QStringLiteral(
"date" );
42 return QStringLiteral(
"time" );
44 case QVariant::DateTime:
45 return QStringLiteral(
"datetime" );
47 case QVariant::ByteArray:
48 return QStringLiteral(
"binary" );
51 return QStringLiteral(
"boolean" );
56 return QStringLiteral(
"string" );
62 if ( geomType.isNull() )
63 geomType = QStringLiteral(
"none" );
69 parts << QStringLiteral(
"crs=%1" ).arg(
crs.
authid() );
73 for (
const auto &
field : fields )
79 QString uri = geomType +
'?' + parts.join(
'&' );
81 options.skipCrsValidation =
true;
82 return new QgsVectorLayer( uri, name, QStringLiteral(
"memory" ), options );
Contains information about the context in which a coordinate transform is executed.
static QString displayString(Type type) SIP_HOLDGIL
Returns a display string type for a WKB type, e.g., the geometry name used in WKT geometry representa...
@ WKT_PREFERRED
Preferred format, matching the most recent WKT ISO standard. Currently an alias to WKT2_2019,...
const QgsCoordinateReferenceSystem & crs
Container of fields for a vector layer.
QString memoryLayerFieldType(QVariant::Type type)
Type
The WKB type describes the number of dimensions a geometry has.
static QgsVectorLayer * createMemoryLayer(const QString &name, const QgsFields &fields, QgsWkbTypes::Type geometryType=QgsWkbTypes::NoGeometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Creates a new memory layer using the specified parameters.
QString authid() const
Returns the authority identifier for the CRS.
QString toWkt(WktVariant variant=WKT1_GDAL, bool multiline=false, int indentationWidth=4) const
Returns a WKT representation of this CRS.
bool isValid() const
Returns whether this CRS is correctly initialized and usable.
This class represents a coordinate reference system (CRS).
Setting options for loading vector layers.
Represents a vector layer which manages a vector based data sets.