@@ -11,93 +11,94 @@ class QgsGeometryAnalyzer
11
11
public:
12
12
13
13
/** Simplify vector layer using (a modified) Douglas-Peucker algorithm
14
- and write it to a new shape file
15
- @param layer input vector layer
16
- @param shapefileName path to the output shp
17
- @param tolerance (level of simplification)
18
- @param onlySelectedFeatures if true, only selected features are considered, else all the features
19
- @param p progress dialog (or 0 if no progress dialog is to be shown)
20
- */
14
+ * and write it to a new shape file
15
+ * @param layer input vector layer
16
+ * @param shapefileName path to the output shp
17
+ * @param tolerance (level of simplification)
18
+ * @param onlySelectedFeatures if true, only selected features are considered, else all the features
19
+ * @param p progress dialog (or 0 if no progress dialog is to be shown)
20
+ */
21
21
bool simplify( QgsVectorLayer* layer, const QString& shapefileName, double tolerance,
22
22
bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
23
23
24
24
/** Calculate the true centroids, or 'center of mass' for a vector layer and
25
- write it to a new shape file
26
- @param layer input vector layer
27
- @param shapefileName path to the output shp
28
- @param onlySelectedFeatures if true, only selected features are considered, else all the features
29
- @param p progress dialog (or 0 if no progress dialog is to be shown)
30
- */
25
+ * write it to a new shape file
26
+ * @param layer input vector layer
27
+ * @param shapefileName path to the output shp
28
+ * @param onlySelectedFeatures if true, only selected features are considered, else all the features
29
+ * @param p progress dialog (or 0 if no progress dialog is to be shown)
30
+ */
31
31
bool centroids( QgsVectorLayer* layer, const QString& shapefileName,
32
32
bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
33
33
34
34
/** Create a polygon based on the extent of all (selected) features and write it to a new shape file
35
- @param layer input vector layer
36
- @param shapefileName path to the output shp
37
- @param onlySelectedFeatures if true, only selected features are considered, else all the features
38
- @param p progress dialog (or 0 if no progress dialog is to be shown)
39
- */
35
+ * @param layer input vector layer
36
+ * @param shapefileName path to the output shp
37
+ * @param onlySelectedFeatures if true, only selected features are considered, else all the features
38
+ * @param p progress dialog (or 0 if no progress dialog is to be shown)
39
+ */
40
40
bool extent( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
41
41
42
42
/** Create buffers for a vector layer and write it to a new shape file
43
- @param layer input vector layer
44
- @param shapefileName path to the output shp
45
- @param bufferDistance distance for buffering (if no buffer field is specified)
46
- @param onlySelectedFeatures if true, only selected features are considered, else all the features
47
- @param dissolve if true, merge all the buffers to a big multipolygon
48
- @param bufferDistanceField index of the attribute field that contains the buffer distance (or -1 if all features have the same buffer distance)
49
- @param p progress dialog (or 0 if no progress dialog is to be shown)
50
- */
43
+ * @param layer input vector layer
44
+ * @param shapefileName path to the output shp
45
+ * @param bufferDistance distance for buffering (if no buffer field is specified)
46
+ * @param onlySelectedFeatures if true, only selected features are considered, else all the features
47
+ * @param dissolve if true, merge all the buffers to a big multipolygon
48
+ * @param bufferDistanceField index of the attribute field that contains the buffer distance (or -1 if all features have the same buffer distance)
49
+ * @param p progress dialog (or 0 if no progress dialog is to be shown)
50
+ */
51
51
bool buffer( QgsVectorLayer* layer, const QString& shapefileName, double bufferDistance,
52
52
bool onlySelectedFeatures = false, bool dissolve = false, int bufferDistanceField = -1, QProgressDialog* p = 0 );
53
53
54
54
/** Create convex hull(s) of a vector layer and write it to a new shape file
55
- @param layer input vector layer
56
- @param shapefileName path to the output shp
57
- @param onlySelectedFeatures if true, only selected features are considered, else all the features
58
- @param uniqueIdField index of the attribute field that contains the unique convex hull id (or -1 if
59
- all features have the same buffer distance)
60
- @param p progress dialog (or 0 if no progress dialog is to be shown)
61
- */
55
+ * @param layer input vector layer
56
+ * @param shapefileName path to the output shp
57
+ * @param onlySelectedFeatures if true, only selected features are considered, else all the features
58
+ * @param uniqueIdField index of the attribute field that contains the unique convex hull id (or -1 if
59
+ * all features have the same buffer distance)
60
+ * @param p progress dialog (or 0 if no progress dialog is to be shown)
61
+ */
62
62
bool convexHull( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false,
63
63
int uniqueIdField = -1, QProgressDialog* p = 0 );
64
64
65
65
/** Dissolve a vector layer and write it to a new shape file
66
- @param layer input vector layer
67
- @param shapefileName path to the output shp
68
- @param onlySelectedFeatures if true, only selected features are considered, else all the features
69
- @param uniqueIdField index of the attribute field that contains the unique id to dissolve on (or -1 if
70
- all features should be dissolved together)
71
- @param p progress dialog (or 0 if no progress dialog is to be shown)
72
- */
66
+ * @param layer input vector layer
67
+ * @param shapefileName path to the output shp
68
+ * @param onlySelectedFeatures if true, only selected features are considered, else all the features
69
+ * @param uniqueIdField index of the attribute field that contains the unique id to dissolve on (or -1 if
70
+ * all features should be dissolved together)
71
+ * @param p progress dialog (or 0 if no progress dialog is to be shown)
72
+ */
73
73
bool dissolve( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false,
74
74
int uniqueIdField = -1, QProgressDialog* p = 0 );
75
75
76
76
/** Creates an event layer (multipoint or multiline) by locating features from a (non-spatial) event table along the features of a line layer.
77
- Note that currently (until QgsGeometry supports m-values) the z-coordinate of the line layer is used for linear referencing
78
- @param lineLayer layer with the line geometry
79
- @param eventLayer layer with features and location field
80
- @param lineField join index in line layer
81
- @param eventField join index in event layer
82
- @param outputLayer name of output file (can be empty if a memory layer is used)
83
- @param outputFormat name of output format (can be empty if a memory provider is used to store the results)
84
- @param unlocatedFeatureIds out: ids of event features where linear referencing was not successful
85
- @param locationField1 attribute index of location field in event layer
86
- @param locationField2 attribute index of location end field (or -1 for point layer)
87
- @param offsetField attribute index for offset field. Negative offset value = offset to left side, positive value = offset to right side
88
- @param offsetScale factor to scale offset
89
- @param forceSingleGeometry force layer to single point/line type. Feature attributes are copied in case of multiple matches
90
- @param memoryProvider memory provider to write output to (can be 0 if output is written to a file)
91
- @param p progress dialog or 0 if no progress dialog should be shown
92
- */
77
+ * Note that currently (until QgsGeometry supports m-values) the z-coordinate of the line layer is used for linear referencing
78
+ * @param lineLayer layer with the line geometry
79
+ * @param eventLayer layer with features and location field
80
+ * @param lineField join index in line layer
81
+ * @param eventField join index in event layer
82
+ * @param outputLayer name of output file (can be empty if a memory layer is used)
83
+ * @param outputFormat name of output format (can be empty if a memory provider is used to store the results)
84
+ * @param unlocatedFeatureIds out: ids of event features where linear referencing was not successful
85
+ * @param locationField1 attribute index of location field in event layer
86
+ * @param locationField2 attribute index of location end field (or -1 for point layer)
87
+ * @param offsetField attribute index for offset field. Negative offset value = offset to left side, positive value = offset to right side
88
+ * @param offsetScale factor to scale offset
89
+ * @param forceSingleGeometry force layer to single point/line type. Feature attributes are copied in case of multiple matches
90
+ * @param memoryProvider memory provider to write output to (can be 0 if output is written to a file)
91
+ * @param p progress dialog or 0 if no progress dialog should be shown
92
+ */
93
93
bool eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer* eventLayer, int lineField, int eventField, QSet<qint64> &unlocatedFeatureIds /Out/, const QString& outputLayer,
94
94
const QString& outputFormat, int locationField1, int locationField2 = -1, int offsetField = -1, double offsetScale = 1.0,
95
95
bool forceSingleGeometry = false, QgsVectorDataProvider* memoryProvider = 0, QProgressDialog* p = 0 );
96
96
97
97
/** Returns linear reference geometry as a multiline (or 0 if no match). Currently, the z-coordinates are considered to be the measures (no support for m-values in QGIS)*/
98
98
QgsGeometry* locateBetweenMeasures( double fromMeasure, double toMeasure, const QgsGeometry* lineGeom );
99
99
/** Returns linear reference geometry. Unlike the PostGIS function, this method always returns multipoint or 0 if no match (not geometry collection).
100
- Currently, the z-coordinates are considered to be the measures (no support for m-values in QGIS)*/
100
+ * Currently, the z-coordinates are considered to be the measures (no support for m-values in QGIS)
101
+ */
101
102
QgsGeometry* locateAlongMeasure( double measure, const QgsGeometry* lineGeom );
102
103
103
104
};
0 commit comments