25QString QgsReverseLineDirectionAlgorithm ::name()
const
27 return QStringLiteral(
"reverselinedirection" );
30QString QgsReverseLineDirectionAlgorithm ::displayName()
const
32 return QObject::tr(
"Reverse line direction" );
35QStringList QgsReverseLineDirectionAlgorithm ::tags()
const
37 return QObject::tr(
"swap,reverse,switch,flip,linestring,orientation" ).split(
',' );
40QString QgsReverseLineDirectionAlgorithm ::group()
const
42 return QObject::tr(
"Vector geometry" );
45QString QgsReverseLineDirectionAlgorithm ::groupId()
const
47 return QStringLiteral(
"vectorgeometry" );
50QString QgsReverseLineDirectionAlgorithm ::outputName()
const
52 return QObject::tr(
"Reversed" );
55QString QgsReverseLineDirectionAlgorithm ::shortHelpString()
const
57 return QObject::tr(
"This algorithm reverses the direction of curve or LineString geometries." );
60QString QgsReverseLineDirectionAlgorithm::shortDescription()
const
62 return QObject::tr(
"Reverses the direction of curve or LineString geometries." );
65QgsReverseLineDirectionAlgorithm *QgsReverseLineDirectionAlgorithm ::createInstance()
const
67 return new QgsReverseLineDirectionAlgorithm();
75QList<int> QgsReverseLineDirectionAlgorithm::inputLayerTypes()
const
97 std::unique_ptr<QgsCurve> reversed( curve->
reversed() );
103 const QgsGeometry outGeom( std::move( reversed ) );
117 std::unique_ptr<QgsCurve> reversed( curve->
reversed() );
123 destCollection->addGeometry( reversed.release() );
126 const QgsGeometry outGeom( std::move( destCollection ) );
ProcessingSourceType
Processing data source types.
@ VectorLine
Vector line layers.
@ SkipGeometryValidityChecks
Invalid geometry checks should always be skipped. This flag can be useful for algorithms which always...
QFlags< ProcessingFeatureSourceFlag > ProcessingFeatureSourceFlags
Flags which control how QgsProcessingFeatureSource fetches features.
Abstract base class for curved geometry type.
virtual QgsCurve * reversed() const =0
Returns a reversed copy of the curve, where the direction of the curve has been flipped.
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.
QgsGeometryCollection * createEmptyWithSameType() const override
Creates a new geometry with the same class and same WKB type as the original and transfers ownership.
int numGeometries() const
Returns the number of geometries within the collection.
const QgsAbstractGeometry * geometryN(int n) const
Returns a const reference to a geometry from within the collection.
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.
bool isMultipart() const
Returns true if WKB of the geometry is of WKBMulti* type.
Contains information about the context in which a processing algorithm is executed.
Custom exception class for processing related exceptions.
Base class for providing feedback from a processing algorithm.
T qgsgeometry_cast(QgsAbstractGeometry *geom)
QList< QgsFeature > QgsFeatureList