QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
23 QString QgsFixGeometriesAlgorithm::name()
const
25 return QStringLiteral(
"fixgeometries" );
28 QString QgsFixGeometriesAlgorithm::displayName()
const
30 return QObject::tr(
"Fix geometries" );
33 QStringList QgsFixGeometriesAlgorithm::tags()
const
35 return QObject::tr(
"repair,invalid,geometry,make,valid" ).split(
',' );
38 QString QgsFixGeometriesAlgorithm::group()
const
40 return QObject::tr(
"Vector geometry" );
43 QString QgsFixGeometriesAlgorithm::groupId()
const
45 return QStringLiteral(
"vectorgeometry" );
53 QString QgsFixGeometriesAlgorithm::outputName()
const
55 return QObject::tr(
"Fixed geometries" );
63 QString QgsFixGeometriesAlgorithm::shortHelpString()
const
65 return QObject::tr(
"This algorithm attempts to create a valid representation of a given invalid geometry without "
66 "losing any of the input vertices. Already-valid geometries are returned without further intervention. "
67 "Always outputs multi-geometry layer.\n\n"
68 "NOTE: M values will be dropped from the output." );
71 QgsFixGeometriesAlgorithm *QgsFixGeometriesAlgorithm::createInstance()
const
73 return new QgsFixGeometriesAlgorithm();
76 bool QgsFixGeometriesAlgorithm::supportInPlaceEdit(
const QgsMapLayer *l )
const
78 const QgsVectorLayer *layer = qobject_cast< const QgsVectorLayer * >( l );
96 if ( outputGeometry.
isNull() )
98 feedback->
pushInfo( QObject::tr(
"makeValid failed for feature %1 " ).arg( feature.
id() ) );
108 QVector< QgsGeometry > matchingParts;
114 if ( !matchingParts.empty() )
static Type multiType(Type type)
Returns the multi type for a WKB type.
Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
virtual void pushInfo(const QString &info)
Pushes a general informational message from the algorithm.
QgsWkbTypes::Type wkbType() const
Returns type of the geometry as a WKB type (point / linestring / polygon etc.)
bool isSpatial() const FINAL
Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeome...
@ FlagSkipGeometryValidityChecks
Invalid geometry checks should always be skipped. This flag can be useful for algorithms which always...
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...
QVector< QgsGeometry > asGeometryCollection() const
Returns contents of the geometry as a list of geometries.
void clearGeometry()
Removes any geometry associated with the feature.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
QList< QgsFeature > QgsFeatureList
static GeometryType geometryType(Type type)
Returns the geometry type for a WKB type, e.g., both MultiPolygon and CurvePolygon would have a Polyg...
static bool hasM(Type type)
Tests whether a WKB type contains m values.
Flag
Flags controlling how QgsProcessingFeatureSource fetches features.
QgsGeometry makeValid() const
Attempts to make an invalid geometry valid without losing vertices.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
static QString displayString(Type type)
Returns a display string type for a WKB type, e.g., the geometry name used in WKT geometry representa...
bool convertToMultiType()
Converts single type geometry into multitype geometry e.g.
QgsWkbTypes::GeometryType type
static Type flatType(Type type)
Returns the flat type for a WKB type.
static QgsGeometry collectGeometry(const QVector< QgsGeometry > &geometries)
Creates a new multipart geometry from a list of QgsGeometry objects.