QGIS API Documentation
2.12.0-Lyon
|
The class defines interface for querying point location: More...
#include <qgspointlocator.h>
Classes | |
struct | Match |
struct | MatchFilter |
Interface that allows rejection of some matches in intersection queries (e.g. More... | |
Public Types | |
typedef class QList< Match > | MatchList |
enum | Type { Invalid = 0, Vertex = 1, Edge = 2, Area = 4, All = Vertex | Edge | Area } |
Public Member Functions | |
QgsPointLocator (QgsVectorLayer *layer, const QgsCoordinateReferenceSystem *destCRS=0, const QgsRectangle *extent=0) | |
Construct point locator for a layer. More... | |
~QgsPointLocator () | |
MatchList | edgesInRect (const QgsRectangle &rect, MatchFilter *filter=0) |
Find edges within a specified recangle Optional filter may discard unwanted matches. More... | |
MatchList | edgesInRect (const QgsPoint &point, double tolerance, MatchFilter *filter=0) |
Override of edgesInRect that construct rectangle from a center point and tolerance. More... | |
bool | hasIndex () const |
Indicate whether the data have been already indexed. More... | |
bool | init (int maxFeaturesToIndex=-1) |
Prepare the index for queries. More... | |
Match | nearestEdge (const QgsPoint &point, double tolerance, MatchFilter *filter=0) |
Find nearest edges to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More... | |
Match | nearestVertex (const QgsPoint &point, double tolerance, MatchFilter *filter=0) |
Find nearest vertex to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More... | |
MatchList | pointInPolygon (const QgsPoint &point) |
find out if the point is in any polygons More... | |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
void | destroyIndex () |
bool | rebuildIndex (int maxFeaturesToIndex=-1) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Friends | |
class | QgsPointLocator_VisitorArea |
class | QgsPointLocator_VisitorEdgesInRect |
class | QgsPointLocator_VisitorNearestEdge |
class | QgsPointLocator_VisitorNearestVertex |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
The class defines interface for querying point location:
Works with one layer.
Definition at line 48 of file qgspointlocator.h.
typedef class QList< Match > QgsPointLocator::MatchList |
Definition at line 135 of file qgspointlocator.h.
Enumerator | |
---|---|
Invalid | |
Vertex | |
Edge | |
Area | |
All |
Definition at line 60 of file qgspointlocator.h.
|
explicit |
Construct point locator for a layer.
Definition at line 574 of file qgspointlocator.cpp.
QgsPointLocator::~QgsPointLocator | ( | ) |
Definition at line 600 of file qgspointlocator.cpp.
|
protected |
Definition at line 708 of file qgspointlocator.cpp.
QgsPointLocator::MatchList QgsPointLocator::edgesInRect | ( | const QgsRectangle & | rect, |
QgsPointLocator::MatchFilter * | filter = 0 |
||
) |
Find edges within a specified recangle Optional filter may discard unwanted matches.
Definition at line 818 of file qgspointlocator.cpp.
QgsPointLocator::MatchList QgsPointLocator::edgesInRect | ( | const QgsPoint & | point, |
double | tolerance, | ||
QgsPointLocator::MatchFilter * | filter = 0 |
||
) |
Override of edgesInRect that construct rectangle from a center point and tolerance.
Definition at line 834 of file qgspointlocator.cpp.
bool QgsPointLocator::hasIndex | ( | ) | const |
Indicate whether the data have been already indexed.
Definition at line 614 of file qgspointlocator.cpp.
bool QgsPointLocator::init | ( | int | maxFeaturesToIndex = -1 | ) |
Prepare the index for queries.
Does nothing if the index already exists. If the number of features is greater than the value of maxFeaturesToIndex, creation of index is stopped to make sure we do not run out of memory. If maxFeaturesToIndex is -1, no limits are used. Returns false if the creation of index has been prematurely stopped due to the limit of features, otherwise true
Definition at line 609 of file qgspointlocator.cpp.
QgsPointLocator::Match QgsPointLocator::nearestEdge | ( | const QgsPoint & | point, |
double | tolerance, | ||
MatchFilter * | filter = 0 |
||
) |
Find nearest edges to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches.
Definition at line 800 of file qgspointlocator.cpp.
QgsPointLocator::Match QgsPointLocator::nearestVertex | ( | const QgsPoint & | point, |
double | tolerance, | ||
MatchFilter * | filter = 0 |
||
) |
Find nearest vertex to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches.
Definition at line 782 of file qgspointlocator.cpp.
QgsPointLocator::MatchList QgsPointLocator::pointInPolygon | ( | const QgsPoint & | point | ) |
find out if the point is in any polygons
Definition at line 841 of file qgspointlocator.cpp.
|
protected |
Definition at line 621 of file qgspointlocator.cpp.
|
friend |
Definition at line 192 of file qgspointlocator.h.
|
friend |
Definition at line 193 of file qgspointlocator.h.
|
friend |
Definition at line 191 of file qgspointlocator.h.
|
friend |
Definition at line 190 of file qgspointlocator.h.