24QString QgsPromoteToMultipartAlgorithm::name()
const
26 return QStringLiteral(
"promotetomulti" );
29QString QgsPromoteToMultipartAlgorithm::displayName()
const
31 return QObject::tr(
"Promote to multipart" );
34QStringList QgsPromoteToMultipartAlgorithm::tags()
const
36 return QObject::tr(
"multi,single,multiple,convert,force,parts" ).split(
',' );
39QString QgsPromoteToMultipartAlgorithm::group()
const
41 return QObject::tr(
"Vector geometry" );
44QString QgsPromoteToMultipartAlgorithm::groupId()
const
46 return QStringLiteral(
"vectorgeometry" );
49QString QgsPromoteToMultipartAlgorithm::outputName()
const
51 return QObject::tr(
"Multiparts" );
54QString QgsPromoteToMultipartAlgorithm::shortHelpString()
const
56 return QObject::tr(
"This algorithm takes a vector layer with singlepart geometries and generates a new one in which all geometries are "
57 "multipart. Input features which are already multipart features will remain unchanged." )
58 + QStringLiteral(
"\n\n" ) + QObject::tr(
"This algorithm can be used to force geometries to multipart types in order to be compatible with data providers "
59 "with strict singlepart/multipart compatibility checks." )
60 + QStringLiteral(
"\n\n" ) + QObject::tr(
"See the 'Collect geometries' or 'Aggregate' algorithms for alternative options." );
63QString QgsPromoteToMultipartAlgorithm::shortDescription()
const
65 return QObject::tr(
"Generates a vector layer in which all geometries are multipart." );
68QgsPromoteToMultipartAlgorithm *QgsPromoteToMultipartAlgorithm::createInstance()
const
70 return new QgsPromoteToMultipartAlgorithm();
73bool QgsPromoteToMultipartAlgorithm::supportInPlaceEdit(
const QgsMapLayer *l )
const
75 const QgsVectorLayer *layer = qobject_cast<const QgsVectorLayer *>( l );
@ SkipGeometryValidityChecks
Invalid geometry checks should always be skipped. This flag can be useful for algorithms which always...
WkbType
The WKB type describes the number of dimensions a geometry has.
QFlags< ProcessingFeatureSourceFlag > ProcessingFeatureSourceFlags
Flags which control how QgsProcessingFeatureSource fetches features.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
bool hasGeometry() const
Returns true if the feature has an associated geometry.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
A geometry is the spatial representation of a feature.
bool isMultipart() const
Returns true if WKB of the geometry is of WKBMulti* type.
bool convertToMultiType()
Converts single type geometry into multitype geometry e.g.
Base class for all map layer types.
Contains information about the context in which a processing algorithm is executed.
bool supportInPlaceEdit(const QgsMapLayer *layer) const override
Checks whether this algorithm supports in-place editing on the given layer Default implementation for...
Base class for providing feedback from a processing algorithm.
Represents a vector layer which manages a vector based dataset.
Q_INVOKABLE Qgis::WkbType wkbType() const final
Returns the WKBType or WKBUnknown in case of error.
static Qgis::WkbType multiType(Qgis::WkbType type)
Returns the multi type for a WKB type.
static Q_INVOKABLE bool isMultiType(Qgis::WkbType type)
Returns true if the WKB type is a multi type.
QList< QgsFeature > QgsFeatureList