|
1 |
| -/** \ingroup analysis |
2 |
| - * The Qgis class provides vector geometry analysis functions |
3 |
| - */ |
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/analysis/vector/qgsgeometryanalyzer.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
4 | 13 |
|
5 | 14 | class QgsGeometryAnalyzer
|
6 | 15 | {
|
7 |
| -%TypeHeaderCode |
8 |
| -#include <qgsgeometryanalyzer.h> |
| 16 | +%Docstring |
| 17 | + The QGis class provides vector geometry analysis functions |
9 | 18 | %End
|
10 | 19 |
|
| 20 | +%TypeHeaderCode |
| 21 | +#include "qgsgeometryanalyzer.h" |
| 22 | +%End |
11 | 23 | public:
|
12 | 24 |
|
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 |
| - */ |
21 |
| - bool simplify( QgsVectorLayer* layer, const QString& shapefileName, double tolerance, |
| 25 | + bool simplify( QgsVectorLayer *layer, const QString &shapefileName, double tolerance, |
22 | 26 | bool onlySelectedFeatures = false, QProgressDialog *p = 0 );
|
| 27 | +%Docstring |
| 28 | + Simplify vector layer using (a modified) Douglas-Peucker algorithm |
| 29 | + and write it to a new shape file |
| 30 | + \param layer input vector layer |
| 31 | + \param shapefileName path to the output shp |
| 32 | + \param tolerance (level of simplification) |
| 33 | + \param onlySelectedFeatures if true, only selected features are considered, else all the features |
| 34 | + \param p progress dialog (or 0 if no progress dialog is to be shown) |
| 35 | + :rtype: bool |
| 36 | +%End |
23 | 37 |
|
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 |
| - */ |
31 |
| - bool centroids( QgsVectorLayer* layer, const QString& shapefileName, |
| 38 | + bool centroids( QgsVectorLayer *layer, const QString &shapefileName, |
32 | 39 | bool onlySelectedFeatures = false, QProgressDialog *p = 0 );
|
| 40 | +%Docstring |
| 41 | + Calculate the true centroids, or 'center of mass' for a vector layer and |
| 42 | + write it to a new shape file |
| 43 | + \param layer input vector layer |
| 44 | + \param shapefileName path to the output shp |
| 45 | + \param onlySelectedFeatures if true, only selected features are considered, else all the features |
| 46 | + \param p progress dialog (or 0 if no progress dialog is to be shown) |
| 47 | + :rtype: bool |
| 48 | +%End |
33 | 49 |
|
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 |
| - */ |
40 | 50 | bool extent( QgsVectorLayer *layer, const QString &shapefileName, bool onlySelectedFeatures = false, QProgressDialog *p = 0 );
|
| 51 | +%Docstring |
| 52 | + Create a polygon based on the extent of all (selected) features and write it to a new shape file |
| 53 | + \param layer input vector layer |
| 54 | + \param shapefileName path to the output shp |
| 55 | + \param onlySelectedFeatures if true, only selected features are considered, else all the features |
| 56 | + \param p progress dialog (or 0 if no progress dialog is to be shown) |
| 57 | + :rtype: bool |
| 58 | +%End |
41 | 59 |
|
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 |
| - */ |
51 |
| - bool buffer( QgsVectorLayer* layer, const QString& shapefileName, double bufferDistance, |
| 60 | + bool buffer( QgsVectorLayer *layer, const QString &shapefileName, double bufferDistance, |
52 | 61 | bool onlySelectedFeatures = false, bool dissolve = false, int bufferDistanceField = -1, QProgressDialog *p = 0 );
|
| 62 | +%Docstring |
| 63 | + Create buffers for a vector layer and write it to a new shape file |
| 64 | + \param layer input vector layer |
| 65 | + \param shapefileName path to the output shp |
| 66 | + \param bufferDistance distance for buffering (if no buffer field is specified) |
| 67 | + \param onlySelectedFeatures if true, only selected features are considered, else all the features |
| 68 | + \param dissolve if true, merge all the buffers to a big multipolygon |
| 69 | + \param bufferDistanceField index of the attribute field that contains the buffer distance (or -1 if all features have the same buffer distance) |
| 70 | + \param p progress dialog (or 0 if no progress dialog is to be shown) |
| 71 | + :rtype: bool |
| 72 | +%End |
53 | 73 |
|
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 |
| - */ |
62 |
| - bool convexHull( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false, |
| 74 | + bool convexHull( QgsVectorLayer *layer, const QString &shapefileName, bool onlySelectedFeatures = false, |
63 | 75 | int uniqueIdField = -1, QProgressDialog *p = 0 );
|
| 76 | +%Docstring |
| 77 | + Create convex hull(s) of a vector layer and write it to a new shape file |
| 78 | + \param layer input vector layer |
| 79 | + \param shapefileName path to the output shp |
| 80 | + \param onlySelectedFeatures if true, only selected features are considered, else all the features |
| 81 | + \param uniqueIdField index of the attribute field that contains the unique convex hull id (or -1 if |
| 82 | + all features have the same buffer distance) |
| 83 | + \param p progress dialog (or 0 if no progress dialog is to be shown) |
| 84 | + :rtype: bool |
| 85 | +%End |
64 | 86 |
|
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 |
| - */ |
73 |
| - bool dissolve( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false, |
| 87 | + bool dissolve( QgsVectorLayer *layer, const QString &shapefileName, bool onlySelectedFeatures = false, |
74 | 88 | int uniqueIdField = -1, QProgressDialog *p = 0 );
|
| 89 | +%Docstring |
| 90 | + Dissolve a vector layer and write it to a new shape file |
| 91 | + \param layer input vector layer |
| 92 | + \param shapefileName path to the output shp |
| 93 | + \param onlySelectedFeatures if true, only selected features are considered, else all the features |
| 94 | + \param uniqueIdField index of the attribute field that contains the unique id to dissolve on (or -1 if |
| 95 | + all features should be dissolved together) |
| 96 | + \param p progress dialog (or 0 if no progress dialog is to be shown) |
| 97 | + :rtype: bool |
| 98 | +%End |
75 | 99 |
|
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 |
| - */ |
93 |
| - bool eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer* eventLayer, int lineField, int eventField, QSet<qint64> &unlocatedFeatureIds /Out/, const QString& outputLayer, |
94 |
| - const QString& outputFormat, int locationField1, int locationField2 = -1, int offsetField = -1, double offsetScale = 1.0, |
| 100 | + bool eventLayer( QgsVectorLayer *lineLayer, QgsVectorLayer *eventLayer, int lineField, int eventField, QgsFeatureIds &unlocatedFeatureIds /Out/, const QString &outputLayer, |
| 101 | + const QString &outputFormat, int locationField1, int locationField2 = -1, int offsetField = -1, double offsetScale = 1.0, |
95 | 102 | bool forceSingleGeometry = false, QgsVectorDataProvider *memoryProvider = 0, QProgressDialog *p = 0 );
|
| 103 | +%Docstring |
| 104 | + Creates an event layer (multipoint or multiline) by locating features from a (non-spatial) event table along the features of a line layer. |
| 105 | + Note that currently (until QgsGeometry supports m-values) the z-coordinate of the line layer is used for linear referencing |
| 106 | + \param lineLayer layer with the line geometry |
| 107 | + \param eventLayer layer with features and location field |
| 108 | + \param lineField join index in line layer |
| 109 | + \param eventField join index in event layer |
| 110 | + \param outputLayer name of output file (can be empty if a memory layer is used) |
| 111 | + \param outputFormat name of output format (can be empty if a memory provider is used to store the results) |
| 112 | + \param unlocatedFeatureIds out: ids of event features where linear referencing was not successful |
| 113 | + \param locationField1 attribute index of location field in event layer |
| 114 | + \param locationField2 attribute index of location end field (or -1 for point layer) |
| 115 | + \param offsetField attribute index for offset field. Negative offset value = offset to left side, positive value = offset to right side |
| 116 | + \param offsetScale factor to scale offset |
| 117 | + \param forceSingleGeometry force layer to single point/line type. Feature attributes are copied in case of multiple matches |
| 118 | + \param memoryProvider memory provider to write output to (can be 0 if output is written to a file) |
| 119 | + \param p progress dialog or 0 if no progress dialog should be shown |
| 120 | + :rtype: bool |
| 121 | +%End |
96 | 122 |
|
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 | 123 | QgsGeometry locateBetweenMeasures( double fromMeasure, double toMeasure, const QgsGeometry &lineGeom );
|
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) |
101 |
| - */ |
| 124 | +%Docstring |
| 125 | +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) |
| 126 | + :rtype: QgsGeometry |
| 127 | +%End |
| 128 | + |
102 | 129 | QgsGeometry locateAlongMeasure( double measure, const QgsGeometry &lineGeom );
|
| 130 | +%Docstring |
| 131 | + Returns linear reference geometry. Unlike the PostGIS function, this method always returns multipoint or 0 if no match (not geometry collection). |
| 132 | + Currently, the z-coordinates are considered to be the measures (no support for m-values in QGIS) |
| 133 | + :rtype: QgsGeometry |
| 134 | +%End |
103 | 135 |
|
104 | 136 | };
|
| 137 | +/************************************************************************ |
| 138 | + * This file has been generated automatically from * |
| 139 | + * * |
| 140 | + * src/analysis/vector/qgsgeometryanalyzer.h * |
| 141 | + * * |
| 142 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 143 | + ************************************************************************/ |
0 commit comments