QGIS API Documentation 4.1.0-Master (ca2ac17535b)
Loading...
Searching...
No Matches
qgsoverlayutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsoverlayutils.h
3 ---------------------
4 Date : April 2018
5 Copyright : (C) 2018 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSOVERLAYUTILS_H
17#define QGSOVERLAYUTILS_H
18
19#include "qgsgeometry.h"
20#include "qgswkbtypes.h"
21
22#include <QList>
23
24#define SIP_NO_FILE
25
27
29class QgsFeatureSink;
30class QgsFields;
33
34namespace QgsOverlayUtils
35{
36
38 enum DifferenceOutput
39 {
40 OutputA,
41 OutputAB,
42 OutputBA,
43 };
44
45
51 enum SanitizeFlag
52 {
53 DontPromotePointGeometryToMultiPoint = 1 << 0,
54 };
55
61 Q_DECLARE_FLAGS( SanitizeFlags, SanitizeFlag )
62
63
64 void difference(
65 const QgsFeatureSource &sourceA,
66 const QgsFeatureSource &sourceB,
67 QgsFeatureSink &sink,
68 const QString &sinkName,
69 QgsProcessingContext &context,
70 QgsProcessingFeedback *feedback,
71 long &count,
72 long totalCount,
73 DifferenceOutput outputAttrs,
74 const QgsGeometryParameters &parameters = QgsGeometryParameters(),
75 SanitizeFlags flags = SanitizeFlags()
76 );
77
78 void intersection(
79 const QgsFeatureSource &sourceA,
80 const QgsFeatureSource &sourceB,
81 QgsFeatureSink &sink,
82 const QString &sinkName,
83 QgsProcessingContext &context,
84 QgsProcessingFeedback *feedback,
85 long &count,
86 long totalCount,
87 const QList<int> &fieldIndicesA,
88 const QList<int> &fieldIndicesB,
89 const QgsGeometryParameters &parameters = QgsGeometryParameters()
90 );
91
93 bool sanitizeIntersectionResult( QgsGeometry &geom, Qgis::GeometryType geometryType, SanitizeFlags flags = SanitizeFlags() );
94
105 void resolveOverlaps(
106 const QgsFeatureSource &source,
107 QgsFeatureSink &sink,
108 const QString &sinkName,
109 QgsProcessingFeedback *feedback,
110 const QgsGeometryParameters &parameters = QgsGeometryParameters(),
111 SanitizeFlags flags = SanitizeFlags()
112 );
113} // namespace QgsOverlayUtils
114
115Q_DECLARE_OPERATORS_FOR_FLAGS( QgsOverlayUtils::SanitizeFlags )
116
117
118
119#endif // QGSOVERLAYUTILS_H
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:379
An interface for objects which accept features via addFeature(s) methods.
An interface for objects which provide features via a getFeatures method.
Container of fields for a vector layer.
Definition qgsfields.h:46
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsProjectionSelectionWidget::CrsOptions)