QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
23 QString QgsMinimumEnclosingCircleAlgorithm::name()
const
25 return QStringLiteral(
"minimumenclosingcircle" );
28 QString QgsMinimumEnclosingCircleAlgorithm::displayName()
const
30 return QObject::tr(
"Minimum enclosing circles" );
33 QStringList QgsMinimumEnclosingCircleAlgorithm::tags()
const
35 return QObject::tr(
"minimum,circle,ellipse,extent,bounds,bounding" ).split(
',' );
38 QString QgsMinimumEnclosingCircleAlgorithm::group()
const
40 return QObject::tr(
"Vector geometry" );
43 QString QgsMinimumEnclosingCircleAlgorithm::groupId()
const
45 return QStringLiteral(
"vectorgeometry" );
48 QString QgsMinimumEnclosingCircleAlgorithm::outputName()
const
50 return QObject::tr(
"Minimum enclosing circles" );
55 return QgsWkbTypes::Type::Polygon;
58 void QgsMinimumEnclosingCircleAlgorithm::initParameters(
const QVariantMap & )
61 72,
false, 8, 100000 ) );
64 QString QgsMinimumEnclosingCircleAlgorithm::shortHelpString()
const
66 return QObject::tr(
"This algorithm calculates the minimum enclosing circle which covers each feature in an input layer." ) +
67 QStringLiteral(
"\n\n" ) +
68 QObject::tr(
"See the 'Minimum bounding geometry' algorithm for a minimal enclosing circle calculation which covers the whole layer or grouped subsets of features." );
71 QgsMinimumEnclosingCircleAlgorithm *QgsMinimumEnclosingCircleAlgorithm::createInstance()
const
73 return new QgsMinimumEnclosingCircleAlgorithm();
76 bool QgsMinimumEnclosingCircleAlgorithm::supportInPlaceEdit(
const QgsMapLayer *l )
const
78 const QgsVectorLayer *layer = qobject_cast< const QgsVectorLayer * >( l );
88 QgsFields QgsMinimumEnclosingCircleAlgorithm::outputFields(
const QgsFields &inputFields )
const
91 fields.
append(
QgsField( QStringLiteral(
"radius" ), QVariant::Double, QString(), 20, 6 ) );
92 fields.
append(
QgsField( QStringLiteral(
"area" ), QVariant::Double, QString(), 20, 6 ) );
98 mSegments = parameterAsInt( parameters, QStringLiteral(
"SEGMENTS" ), context );
113 << M_PI *radius *radius;
Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
A numeric parameter for processing algorithms.
Base class for providing feedback from a processing algorithm.
Container of fields for a vector layer.
QgsGeometry minimalEnclosingCircle(QgsPointXY ¢er, double &radius, unsigned int segments=36) const
Returns the minimal enclosing circle for the geometry.
Type
The WKB type describes the number of dimensions a geometry has.
bool supportInPlaceEdit(const QgsMapLayer *layer) const override
Checks whether this algorithm supports in-place editing on the given layer Default implementation for...
bool append(const QgsField &field, FieldOrigin origin=OriginProvider, int originIndex=-1)
Appends a field. The field must have unique name, otherwise it is rejected (returns false)
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
Contains information about the context in which a processing algorithm is executed.
QList< QgsFeature > QgsFeatureList
static bool hasM(Type type) SIP_HOLDGIL
Tests whether a WKB type contains m values.
A class to represent a 2D point.
A geometry is the spatial representation of a feature.
Represents a vector layer which manages a vector based data sets.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
Base class for all map layer types. This is the base class for all map layer types (vector,...
static bool hasZ(Type type) SIP_HOLDGIL
Tests whether a WKB type contains the z-dimension.
A vector of attributes. Mostly equal to QVector<QVariant>.
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.
Encapsulate a field in an attribute table or data source.