22 QString QgsPointToLayerAlgorithm::name()
const
24 return QStringLiteral(
"pointtolayer" );
27 void QgsPointToLayerAlgorithm::initAlgorithm(
const QVariantMap & )
33 QString QgsPointToLayerAlgorithm::shortHelpString()
const
35 return QObject::tr(
"This algorithm creates a new vector layer that contains a single feature with geometry matching a point parameter.\n\n"
36 "It can be used in models to convert a point into a layer which can be used for other algorithms which require "
37 "a layer based input." );
40 QgsPointToLayerAlgorithm *QgsPointToLayerAlgorithm::createInstance()
const
42 return new QgsPointToLayerAlgorithm();
51 fields.
append(
QgsField( QStringLiteral(
"id" ), QVariant::Int ) );
54 std::unique_ptr< QgsFeatureSink > sink( parameterAsSink( parameters, QStringLiteral(
"OUTPUT" ), context, dest, fields,
QgsWkbTypes::Point,
crs ) );
66 outputs.insert( QStringLiteral(
"OUTPUT" ), dest );