QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
24 QString QgsTessellateAlgorithm::name()
const
26 return QStringLiteral(
"tessellate" );
29 QString QgsTessellateAlgorithm::displayName()
const
31 return QObject::tr(
"Tessellate" );
34 QStringList QgsTessellateAlgorithm::tags()
const
36 return QObject::tr(
"3d,triangle" ).split(
',' );
39 QString QgsTessellateAlgorithm::group()
const
41 return QObject::tr(
"Vector geometry" );
44 QString QgsTessellateAlgorithm::groupId()
const
46 return QStringLiteral(
"vectorgeometry" );
49 QString QgsTessellateAlgorithm::outputName()
const
51 return QObject::tr(
"Tessellated" );
61 Q_UNUSED( inputWkbType )
65 QString QgsTessellateAlgorithm::shortHelpString()
const
67 return QObject::tr(
"This algorithm tessellates a polygon geometry layer, dividing the geometries into triangular components." )
68 + QStringLiteral(
"\n\n" )
69 + QObject::tr(
"The output layer consists of multipolygon geometries for each input feature, with each multipolygon consisting of multiple triangle component polygons." );
72 QList<int> QgsTessellateAlgorithm::inputLayerTypes()
const
77 QgsTessellateAlgorithm *QgsTessellateAlgorithm::createInstance()
const
79 return new QgsTessellateAlgorithm();
99 const std::unique_ptr< QgsPolygon > p( qgsgeometry_cast< QgsPolygon * >( ms->
geometryN( i )->
segmentize() ) );
100 t.addPolygon( *p, 0 );
106 t.addPolygon( *p, 0 );
115 feedback->
reportError( QObject::tr(
"Feature ID %1 could not be divided into triangular components." ).arg( f.
id() ) );
Base class for providing feedback from a processing algorithm.
virtual void reportError(const QString &error, bool fatalError=false)
Reports that the algorithm encountered an error while executing.
@ TypeVectorPolygon
Vector polygon layers.
double yMinimum() const SIP_HOLDGIL
Returns the y minimum value (bottom side of rectangle).
Type
The WKB type describes the number of dimensions a geometry has.
Multi surface geometry collection.
A rectangle specified with double values.
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 clearGeometry()
Removes any geometry associated with the feature.
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
double xMinimum() const SIP_HOLDGIL
Returns the x minimum value (left side of rectangle).
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
virtual QgsAbstractGeometry * segmentize(double tolerance=M_PI/180., SegmentationToleranceType toleranceType=MaximumAngle) const
Returns a version of the geometry without curves.
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.
Class that takes care of tessellation of polygons into triangles.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
static GeometryType geometryType(Type type) SIP_HOLDGIL
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
SourceType
Data source types enum.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns type of the geometry as a WKB type (point / linestring / polygon etc.)