22QString QgsMergeLinesAlgorithm::name()
const
24 return QStringLiteral(
"mergelines" );
27QString QgsMergeLinesAlgorithm::displayName()
const
29 return QObject::tr(
"Merge lines" );
32QStringList QgsMergeLinesAlgorithm::tags()
const
34 return QObject::tr(
"line,merge,join,parts" ).split(
',' );
37QString QgsMergeLinesAlgorithm::group()
const
39 return QObject::tr(
"Vector geometry" );
42QString QgsMergeLinesAlgorithm::groupId()
const
44 return QStringLiteral(
"vectorgeometry" );
47QString QgsMergeLinesAlgorithm::outputName()
const
49 return QObject::tr(
"Merged" );
62QString QgsMergeLinesAlgorithm::shortHelpString()
const
64 return QObject::tr(
"This algorithm joins all connected parts of MultiLineString geometries into single LineString geometries.\n\n"
65 "If any parts of the input MultiLineString geometries are not connected, the resultant "
66 "geometry will be a MultiLineString containing any lines which could be merged and any non-connected line parts." );
69QList<int> QgsMergeLinesAlgorithm::inputLayerTypes()
const
74QgsMergeLinesAlgorithm *QgsMergeLinesAlgorithm::createInstance()
const
76 return new QgsMergeLinesAlgorithm();
86 if ( outputGeometry.
isNull() )
87 feedback->
reportError( QObject::tr(
"Error merging lines for feature %1" ).arg( feature.
id() ) );
ProcessingSourceType
Processing data source types.
@ VectorLine
Vector line layers.
WkbType
The WKB type describes the number of dimensions a geometry has.
@ MultiLineString
MultiLineString.
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.
QgsGeometry mergeLines() const
Merges any connected lines in a LineString/MultiLineString geometry and converts them to single line ...
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
virtual void reportError(const QString &error, bool fatalError=false)
Reports that the algorithm encountered an error while executing.
QList< QgsFeature > QgsFeatureList