QGIS API Documentation
2.2.0-Valmiera
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
analysis
vector
qgspointsample.h
Go to the documentation of this file.
1
#ifndef QGSPOINTSAMPLE_H
2
#define QGSPOINTSAMPLE_H
3
4
#include "
qgsfeature.h
"
5
#include <QString>
6
7
class
QgsFeature
;
8
class
QgsPoint
;
9
class
QgsSpatialIndex
;
10
class
QgsVectorFileWriter
;
11
class
QgsVectorLayer
;
12
class
QProgressDialog;
13
15
class
ANALYSIS_EXPORT
QgsPointSample
16
{
17
public
:
18
QgsPointSample
(
QgsVectorLayer
* inputLayer,
const
QString& outputLayer, QString nPointsAttribute, QString minDistAttribute = QString() );
19
~
QgsPointSample
();
20
23
int
createRandomPoints( QProgressDialog* pd );
24
25
private
:
26
27
QgsPointSample
();
//default constructor is forbidden
28
void
addSamplePoints(
QgsFeature
& inputFeature,
QgsVectorFileWriter
& writer,
int
nPoints,
double
minDistance );
29
bool
checkMinDistance(
QgsPoint
& pt,
QgsSpatialIndex
&
index
,
double
minDistance, QMap< QgsFeatureId, QgsPoint >& pointMap );
30
32
QgsVectorLayer
*
mInputLayer
;
34
QString
mOutputLayer
;
36
QString
mNumberOfPointsAttribute
;
38
QString
mMinDistanceAttribute
;
39
QgsFeatureId
mNCreatedPoints
;
//helper to find free ids
40
};
41
42
#endif // QGSPOINTSAMPLE_H
Generated on Sun Feb 23 2014 14:27:18 for QGIS API Documentation by
1.8.1.2