23QString QgsSetMValueAlgorithm::name()
 const 
   25  return QStringLiteral( 
"setmvalue" );
 
   28QString QgsSetMValueAlgorithm::displayName()
 const 
   30  return QObject::tr( 
"Set M value" );
 
   33QStringList QgsSetMValueAlgorithm::tags()
 const 
   35  return QObject::tr( 
"set,add,m,measure,values" ).split( 
',' );
 
   38QString QgsSetMValueAlgorithm::group()
 const 
   40  return QObject::tr( 
"Vector geometry" );
 
   43QString QgsSetMValueAlgorithm::groupId()
 const 
   45  return QStringLiteral( 
"vectorgeometry" );
 
   48QString QgsSetMValueAlgorithm::shortHelpString()
 const 
   50  return QObject::tr( 
"This algorithm sets the M value for geometries in a layer.\n\n" 
   51                      "If M values already exist in the layer, they will be overwritten " 
   52                      "with the new value. If no M values exist, the geometry will be " 
   53                      "upgraded to include M values and the specified value used as " 
   54                      "the initial M value for all geometries." );
 
   57QString QgsSetMValueAlgorithm::shortDescription()
 const 
   59  return QObject::tr( 
"Sets the M value for geometries in a layer." );
 
   62QString QgsSetMValueAlgorithm::outputName()
 const 
   64  return QObject::tr( 
"M Added" );
 
   67QgsSetMValueAlgorithm *QgsSetMValueAlgorithm::createInstance()
 const 
   69  return new QgsSetMValueAlgorithm();
 
   72bool QgsSetMValueAlgorithm::supportInPlaceEdit( 
const QgsMapLayer *l )
 const 
   74  const QgsVectorLayer *layer = qobject_cast<const QgsVectorLayer *>( l );
 
   91void QgsSetMValueAlgorithm::initParameters( 
const QVariantMap & )
 
   94  mValueParam->setIsDynamic( 
true );
 
   96  mValueParam->setDynamicLayerParameterName( QStringLiteral( 
"INPUT" ) );
 
   97  addParameter( mValueParam.release() );
 
  102  mMValue = parameterAsDouble( parameters, QStringLiteral( 
"M_VALUE" ), context );
 
  104  if ( mDynamicMValue )
 
  105    mMValueProperty = parameters.value( QStringLiteral( 
"M_VALUE" ) ).value<
QgsProperty>();
 
  119      newGeometry->dropMValue();
 
  122    if ( mDynamicMValue )
 
  125    newGeometry->addMValue( m );
 
@ 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.
 
@ Double
Double/float values.
 
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.
 
QgsExpressionContext & expressionContext()
Returns the expression context.
 
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.
 
static bool isDynamic(const QVariantMap ¶meters, const QString &name)
Returns true if the parameter with matching name is a dynamic parameter, and must be evaluated once f...
 
Definition for a property.
 
@ Double
Double value (including negative values)
 
A store for object properties.
 
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 addM(Qgis::WkbType type)
Adds the m dimension to a WKB type and returns the new type.
 
static Q_INVOKABLE bool hasM(Qgis::WkbType type)
Tests whether a WKB type contains m values.
 
QList< QgsFeature > QgsFeatureList