QGIS API Documentation
2.8.2-Wien
|
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. | |
~QgsPointLocator () | |
MatchList | edgesInRect (const QgsRectangle &rect, MatchFilter *filter=0) |
Find edges within a specified recangle Optional filter may discard unwanted matches. | |
MatchList | edgesInRect (const QgsPoint &point, double tolerance, MatchFilter *filter=0) |
Override of edgesInRect that construct rectangle from a center point and tolerance. | |
bool | hasIndex () const |
Indicate whether the data have been already indexed. | |
bool | init (int maxFeaturesToIndex=-1) |
Prepare the index for queries. | |
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. | |
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. | |
MatchList | pointInPolygon (const QgsPoint &point) |
find out if the point is in any polygons |
Protected Member Functions | |
void | destroyIndex () |
bool | rebuildIndex (int maxFeaturesToIndex=-1) |
Friends | |
class | QgsPointLocator_VisitorArea |
class | QgsPointLocator_VisitorEdgesInRect |
class | QgsPointLocator_VisitorNearestEdge |
class | QgsPointLocator_VisitorNearestVertex |
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 126 of file qgspointlocator.h.
Definition at line 60 of file qgspointlocator.h.
|
explicit |
Construct point locator for a layer.
Definition at line 571 of file qgspointlocator.cpp.
QgsPointLocator::~QgsPointLocator | ( | ) |
Definition at line 597 of file qgspointlocator.cpp.
|
protected |
Definition at line 696 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 796 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 812 of file qgspointlocator.cpp.
bool QgsPointLocator::hasIndex | ( | ) | const |
Indicate whether the data have been already indexed.
Definition at line 611 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 606 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 778 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 760 of file qgspointlocator.cpp.
QgsPointLocator::MatchList QgsPointLocator::pointInPolygon | ( | const QgsPoint & | point | ) |
find out if the point is in any polygons
Definition at line 819 of file qgspointlocator.cpp.
|
protected |
Definition at line 618 of file qgspointlocator.cpp.
|
friend |
Definition at line 183 of file qgspointlocator.h.
|
friend |
Definition at line 184 of file qgspointlocator.h.
|
friend |
Definition at line 182 of file qgspointlocator.h.
|
friend |
Definition at line 181 of file qgspointlocator.h.