18#include "moc_qgsmaptoolcapturelayergeometry.cpp"
42 if ( !datasetIsCurved || !providerSupportsCurvedSegments )
45 QList<QgsVectorLayer *> avoidIntersectionsLayers;
50 avoidIntersectionsLayers.append( vlayer );
58 if ( avoidIntersectionsLayers.size() > 0 )
@ CircularGeometries
Supports circular geometry types (circularstring, compoundcurve, curvepolygon)
GeometryOperationResult
Success or failure of a geometry operation.
@ InvalidBaseGeometry
The base geometry on which the operation is done is invalid or empty.
@ Warning
Warning message.
@ Critical
Critical/error message.
@ AvoidIntersectionsLayers
Overlap with features from a specified list of layers when digitizing new features not allowed.
@ AllowIntersections
Overlap with any feature allowed when digitizing new features.
@ AvoidIntersectionsCurrentLayer
Overlap with features from the active layer when digitizing new features not allowed.
virtual QgsAbstractGeometry * segmentize(double tolerance=M_PI/180., SegmentationToleranceType toleranceType=MaximumAngle) const
Returns a version of the geometry without curves.
A geometry is the spatial representation of a feature.
const QgsAbstractGeometry * constGet() const
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
Qgis::GeometryOperationResult avoidIntersectionsV2(const QList< QgsVectorLayer * > &avoidIntersectionsLayers, const QHash< QgsVectorLayer *, QSet< QgsFeatureId > > &ignoreFeatures=(QHash< QgsVectorLayer *, QSet< QgsFeatureId > >()))
Modifies geometry to avoid intersections with the layers specified in project properties.
bool isEmpty() const
Returns true if the geometry is empty (eg a linestring with no vertices, or a collection with no geom...
static QgsProject * instance()
Returns the QgsProject singleton instance.
QList< QgsVectorLayer * > avoidIntersectionsLayers
virtual Q_INVOKABLE Qgis::VectorProviderCapabilities capabilities() const
Returns flags containing the supported capabilities.
Represents a vector layer which manages a vector based dataset.
Q_INVOKABLE Qgis::WkbType wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
static Q_INVOKABLE bool isCurvedType(Qgis::WkbType type)
Returns true if the WKB type is a curved type or can contain curved geometries.