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;