22using namespace Qt::StringLiterals;
26QString QgsDropMZValuesAlgorithm::name()
const
28 return u
"dropmzvalues"_s;
31QString QgsDropMZValuesAlgorithm::displayName()
const
33 return QObject::tr(
"Drop M/Z values" );
36QStringList QgsDropMZValuesAlgorithm::tags()
const
38 return QObject::tr(
"drop,set,convert,m,measure,z,25d,3d,values" ).split(
',' );
41QString QgsDropMZValuesAlgorithm::group()
const
43 return QObject::tr(
"Vector geometry" );
46QString QgsDropMZValuesAlgorithm::groupId()
const
48 return u
"vectorgeometry"_s;
51QString QgsDropMZValuesAlgorithm::outputName()
const
53 return QObject::tr(
"Z/M Dropped" );
56QString QgsDropMZValuesAlgorithm::shortHelpString()
const
58 return QObject::tr(
"This algorithm can remove any measure (M) or Z values from input geometries." );
61QString QgsDropMZValuesAlgorithm::shortDescription()
const
63 return QObject::tr(
"Removes any measure (M) or Z values from input geometries." );
66QgsDropMZValuesAlgorithm *QgsDropMZValuesAlgorithm::createInstance()
const
68 return new QgsDropMZValuesAlgorithm();
71bool QgsDropMZValuesAlgorithm::supportInPlaceEdit(
const QgsMapLayer *layer )
const
77void QgsDropMZValuesAlgorithm::initParameters(
const QVariantMap & )
100 mDropM = parameterAsBoolean( parameters, u
"DROP_M_VALUES"_s, context );
101 mDropZ = parameterAsBoolean( parameters, u
"DROP_Z_VALUES"_s, context );
112 newGeom->dropMValue();
114 newGeom->dropZValue();
@ 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.
virtual QgsAbstractGeometry * clone() const =0
Clones the geometry by performing a deep copy.
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.
const QgsAbstractGeometry * constGet() const
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
Base class for all map layer types.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
A boolean parameter for processing algorithms.
static Qgis::WkbType dropM(Qgis::WkbType type)
Drops the m dimension (if present) for a WKB type and returns the new type.
static Qgis::WkbType dropZ(Qgis::WkbType type)
Drops the z dimension (if present) for a WKB type and returns the new type.
QList< QgsFeature > QgsFeatureList