23QString QgsMinimumEnclosingCircleAlgorithm::name()
const
25 return QStringLiteral(
"minimumenclosingcircle" );
28QString QgsMinimumEnclosingCircleAlgorithm::displayName()
const
30 return QObject::tr(
"Minimum enclosing circles" );
33QStringList QgsMinimumEnclosingCircleAlgorithm::tags()
const
35 return QObject::tr(
"minimum,circle,ellipse,extent,bounds,bounding" ).split(
',' );
38QString QgsMinimumEnclosingCircleAlgorithm::group()
const
40 return QObject::tr(
"Vector geometry" );
43QString QgsMinimumEnclosingCircleAlgorithm::groupId()
const
45 return QStringLiteral(
"vectorgeometry" );
48QString QgsMinimumEnclosingCircleAlgorithm::outputName()
const
50 return QObject::tr(
"Minimum enclosing circles" );
58void QgsMinimumEnclosingCircleAlgorithm::initParameters(
const QVariantMap & )
63QString QgsMinimumEnclosingCircleAlgorithm::shortHelpString()
const
65 return QObject::tr(
"This algorithm calculates the minimum enclosing circle which covers each feature in an input layer." ) + QStringLiteral(
"\n\n" ) + QObject::tr(
"See the 'Minimum bounding geometry' algorithm for a minimal enclosing circle calculation which covers the whole layer or grouped subsets of features." );
68QgsMinimumEnclosingCircleAlgorithm *QgsMinimumEnclosingCircleAlgorithm::createInstance()
const
70 return new QgsMinimumEnclosingCircleAlgorithm();
73bool QgsMinimumEnclosingCircleAlgorithm::supportInPlaceEdit(
const QgsMapLayer *l )
const
75 const QgsVectorLayer *layer = qobject_cast<const QgsVectorLayer *>( l );
85QgsFields QgsMinimumEnclosingCircleAlgorithm::outputFields(
const QgsFields &inputFields )
const
88 fields.
append(
QgsField( QStringLiteral(
"radius" ), QMetaType::Type::Double, QString(), 20, 6 ) );
89 fields.
append(
QgsField( QStringLiteral(
"area" ), QMetaType::Type::Double, QString(), 20, 6 ) );
95 mSegments = parameterAsInt( parameters, QStringLiteral(
"SEGMENTS" ), context );
110 << M_PI * radius * radius;
WkbType
The WKB type describes the number of dimensions a geometry has.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
void setAttributes(const QgsAttributes &attrs)
Sets the feature's attributes.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
Encapsulate a field in an attribute table or data source.
Container of fields for a vector layer.
bool append(const QgsField &field, Qgis::FieldOrigin origin=Qgis::FieldOrigin::Provider, int originIndex=-1)
Appends a field.
A geometry is the spatial representation of a feature.
QgsGeometry minimalEnclosingCircle(QgsPointXY ¢er, double &radius, unsigned int segments=36) const
Returns the minimal enclosing circle for the geometry.
Base class for all map layer types.
A class to represent a 2D point.
Contains information about the context in which a processing algorithm is executed.
bool supportInPlaceEdit(const QgsMapLayer *layer) const override
Checks whether this algorithm supports in-place editing on the given layer Default implementation for...
Base class for providing feedback from a processing algorithm.
A numeric parameter for processing algorithms.
Represents a vector layer which manages a vector based data sets.
Q_INVOKABLE Qgis::WkbType wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
static bool hasZ(Qgis::WkbType type)
Tests whether a WKB type contains the z-dimension.
static bool hasM(Qgis::WkbType type)
Tests whether a WKB type contains m values.
QList< QgsFeature > QgsFeatureList