22 QString QgsBoundaryAlgorithm::name()
const 24 return QStringLiteral(
"boundary" );
27 QString QgsBoundaryAlgorithm::displayName()
const 29 return QObject::tr(
"Boundary" );
32 QStringList QgsBoundaryAlgorithm::tags()
const 34 return QObject::tr(
"boundary,ring,border,exterior" ).split(
',' );
37 QString QgsBoundaryAlgorithm::group()
const 39 return QObject::tr(
"Vector geometry" );
42 QString QgsBoundaryAlgorithm::groupId()
const 44 return QStringLiteral(
"vectorgeometry" );
47 QString QgsBoundaryAlgorithm::outputName()
const 49 return QObject::tr(
"Boundary" );
52 QString QgsBoundaryAlgorithm::shortHelpString()
const 54 return QObject::tr(
"Returns the closure of the combinatorial boundary of the input geometries (ie the " 55 "topological boundary of the geometry). For instance, a polygon geometry will have a " 56 "boundary consisting of the linestrings for each ring in the polygon. Only valid for " 57 "polygon or line layers." );
60 QList<int> QgsBoundaryAlgorithm::inputLayerTypes()
const 65 QgsBoundaryAlgorithm *QgsBoundaryAlgorithm::createInstance()
const 67 return new QgsBoundaryAlgorithm();
106 if ( !outputGeometry )
108 feedback->
reportError( QObject::tr(
"No boundary for feature %1 (possibly a closed linestring?)'" ).arg( feature.
id() ) );
Base class for providing feedback from a processing algorithm.
QList< QgsFeature > QgsFeatureList
A geometry is the spatial representation of a feature.
virtual QgsAbstractGeometry * boundary() const =0
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
bool hasGeometry() const
Returns true if the feature has an associated geometry.
static bool hasZ(Type type)
Tests whether a WKB type contains the z-dimension.
Type
The WKB type describes the number of dimensions a geometry has.
static Type addM(Type type)
Adds the m dimension to a WKB type and returns the new type.
static GeometryType geometryType(Type type)
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
static Type addZ(Type type)
Adds the z dimension to a WKB type and returns the new type.
QgsGeometry geometry() const
Returns the geometry associated with this feature.
const QgsAbstractGeometry * constGet() const
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
void clearGeometry()
Removes any geometry associated with the feature.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
static bool hasM(Type type)
Tests whether a WKB type contains m values.
Contains information about the context in which a processing algorithm is executed.
virtual void reportError(const QString &error, bool fatalError=false)
Reports that the algorithm encountered an error while executing.