QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
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() );
Abstract base class for curved geometry type.
Base class for providing feedback from a processing algorithm.
virtual QgsCurve * reversed() const =0
Returns a reversed copy of the curve, where the direction of the curve has been flipped.
@ TypeVectorLine
Vector line layers.
@ FlagSkipGeometryValidityChecks
Invalid geometry checks should always be skipped. This flag can be useful for algorithms which always...
int numGeometries() const SIP_HOLDGIL
Returns the number of geometries within the collection.
bool isMultipart() const SIP_HOLDGIL
Returns true if WKB of the geometry is of WKBMulti* type.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
Contains information about the context in which a processing algorithm is executed.
virtual bool addGeometry(QgsAbstractGeometry *g)
Adds a geometry and takes ownership. Returns true in case of success.
QList< QgsFeature > QgsFeatureList
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
virtual QgsAbstractGeometry * createEmptyWithSameType() const =0
Creates a new geometry with the same class and same WKB type as the original and transfers ownership.
Flag
Flags controlling how QgsProcessingFeatureSource fetches features.
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.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
void reserve(int size) SIP_HOLDGIL
Attempts to allocate memory for at least size geometries.
SourceType
Data source types enum.
Custom exception class for processing related exceptions.