|
| QgsPointLocator (QgsVectorLayer *layer, const QgsCoordinateReferenceSystem &destinationCrs=QgsCoordinateReferenceSystem(), const QgsCoordinateTransformContext &transformContext=QgsCoordinateTransformContext(), const QgsRectangle *extent=nullptr) |
| Construct point locator for a layer. More...
|
|
| ~QgsPointLocator () override |
|
int | cachedGeometryCount () const |
| Returns how many geometries are cached in the index. More...
|
|
QgsCoordinateReferenceSystem | destinationCrs () const |
| Gets destination CRS - may be an invalid QgsCoordinateReferenceSystem if not doing OTF reprojection. More...
|
|
MatchList | edgesInRect (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Override of edgesInRect that construct rectangle from a center point and tolerance This method is either blocking or non blocking according to relaxed parameter passed. More...
|
|
MatchList | edgesInRect (const QgsRectangle &rect, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find edges within a specified rectangle Optional filter may discard unwanted matches. More...
|
|
const QgsRectangle * | extent () const |
| Gets extent of the area point locator covers - if nullptr then it caches the whole layer. More...
|
|
bool | hasIndex () const |
| Indicate whether the data have been already indexed. More...
|
|
bool | init (int maxFeaturesToIndex=-1, bool relaxed=false) |
| Prepare the index for queries. More...
|
|
bool | isIndexing () const |
| Returns true if the point locator is currently indexing the data. More...
|
|
QgsVectorLayer * | layer () const |
| Gets associated layer. More...
|
|
Match | nearestArea (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find nearest area to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More...
|
|
Match | nearestCentroid (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find nearest centroid to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More...
|
|
Match | nearestEdge (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find nearest edge to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More...
|
|
Match | nearestLineEndpoints (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find nearest line endpoint (start or end vertex) to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More...
|
|
Match | nearestMiddleOfSegment (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find nearest middle of segment to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More...
|
|
Match | nearestVertex (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find nearest vertex to the specified point - up to distance specified by tolerance Optional filter may discard unwanted matches. More...
|
|
MatchList | pointInPolygon (const QgsPointXY &point, bool relaxed=false) |
| find out if the point is in any polygons This method is either blocking or non blocking according to relaxed parameter passed More...
|
|
void | setExtent (const QgsRectangle *extent) |
| Configure extent - if not nullptr , it will index only that area. More...
|
|
void | setRenderContext (const QgsRenderContext *context) |
| Configure render context - if not nullptr , it will use to index only visible feature. More...
|
|
MatchList | verticesInRect (const QgsPointXY &point, double tolerance, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Override of verticesInRect that construct rectangle from a center point and tolerance This method is either blocking or non blocking according to relaxed parameter passed. More...
|
|
MatchList | verticesInRect (const QgsRectangle &rect, QgsPointLocator::MatchFilter *filter=nullptr, bool relaxed=false) |
| Find vertices within a specified rectangle This method is either blocking or non blocking according to relaxed parameter passed Optional filter may discard unwanted matches. More...
|
|
void | waitForIndexingFinished () |
| If the point locator has been initialized relaxedly and is currently indexing, this methods waits for the indexing to be finished. More...
|
|