24 QString QgsReverseLineDirectionAlgorithm ::name()
const
26 return QStringLiteral(
"reverselinedirection" );
29 QString QgsReverseLineDirectionAlgorithm ::displayName()
const
31 return QObject::tr(
"Reverse line direction" );
34 QStringList QgsReverseLineDirectionAlgorithm ::tags()
const
36 return QObject::tr(
"swap,reverse,switch,flip,linestring,orientation" ).split(
',' );
39 QString QgsReverseLineDirectionAlgorithm ::group()
const
41 return QObject::tr(
"Vector geometry" );
44 QString QgsReverseLineDirectionAlgorithm ::groupId()
const
46 return QStringLiteral(
"vectorgeometry" );
49 QString QgsReverseLineDirectionAlgorithm ::outputName()
const
51 return QObject::tr(
"Reversed" );
54 QString QgsReverseLineDirectionAlgorithm ::shortHelpString()
const
56 return QObject::tr(
"This algorithm reverses the direction of curve or LineString geometries." );
59 QString QgsReverseLineDirectionAlgorithm::shortDescription()
const
61 return QObject::tr(
"Reverses the direction of curve or LineString geometries." );
64 QgsReverseLineDirectionAlgorithm *QgsReverseLineDirectionAlgorithm ::createInstance()
const
66 return new QgsReverseLineDirectionAlgorithm();
74 QList<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() );