24QString QgsReverseLineDirectionAlgorithm ::name()
const
26 return QStringLiteral(
"reverselinedirection" );
29QString QgsReverseLineDirectionAlgorithm ::displayName()
const
31 return QObject::tr(
"Reverse line direction" );
34QStringList QgsReverseLineDirectionAlgorithm ::tags()
const
36 return QObject::tr(
"swap,reverse,switch,flip,linestring,orientation" ).split(
',' );
39QString QgsReverseLineDirectionAlgorithm ::group()
const
41 return QObject::tr(
"Vector geometry" );
44QString QgsReverseLineDirectionAlgorithm ::groupId()
const
46 return QStringLiteral(
"vectorgeometry" );
49QString QgsReverseLineDirectionAlgorithm ::outputName()
const
51 return QObject::tr(
"Reversed" );
54QString QgsReverseLineDirectionAlgorithm ::shortHelpString()
const
56 return QObject::tr(
"This algorithm reverses the direction of curve or LineString geometries." );
59QString QgsReverseLineDirectionAlgorithm::shortDescription()
const
61 return QObject::tr(
"Reverses the direction of curve or LineString geometries." );
64QgsReverseLineDirectionAlgorithm *QgsReverseLineDirectionAlgorithm ::createInstance()
const
66 return new QgsReverseLineDirectionAlgorithm();
74QList<int> QgsReverseLineDirectionAlgorithm::inputLayerTypes()
const
93 const QgsCurve *curve = qgsgeometry_cast<const QgsCurve *>( geom.
constGet() );
96 std::unique_ptr<QgsCurve> reversed( curve->
reversed() );
102 const QgsGeometry outGeom( std::move( reversed ) );
114 const QgsCurve *curve = qgsgeometry_cast<const QgsCurve *>( collection->
geometryN( i ) );
117 std::unique_ptr<QgsCurve> reversed( curve->
reversed() );
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.
virtual QgsAbstractGeometry * createEmptyWithSameType() const =0
Creates a new geometry with the same class and same WKB type as the original and transfers ownership.
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.
void reserve(int size)
Attempts to allocate memory for at least size geometries.
virtual bool addGeometry(QgsAbstractGeometry *g)
Adds a geometry and takes ownership. Returns true in case of success.
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.
QList< QgsFeature > QgsFeatureList