QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
#include <qgspointlocator.h>
Public Member Functions | |
Match ()=default | |
construct invalid match More... | |
Match (QgsPointLocator::Type t, QgsVectorLayer *vl, QgsFeatureId fid, double dist, const QgsPointXY &pt, int vertexIndex=0, QgsPointXY *edgePoints=nullptr) | |
double | distance () const |
for vertex / edge match units depending on what class returns it (geom.cache: layer units, map canvas snapper: dest crs units) More... | |
void | edgePoints (QgsPointXY &pt1, QgsPointXY &pt2) const |
Only for a valid edge match - obtain endpoints of the edge. More... | |
QgsFeatureId | featureId () const |
The id of the feature to which the snapped geometry belongs. More... | |
bool | hasArea () const |
Returns true if the Match is an area. More... | |
bool | hasCentroid () const |
Returns true if the Match is a centroid. More... | |
bool | hasEdge () const |
Returns true if the Match is an edge. More... | |
bool | hasLineEndpoint () const |
Returns true if the Match is a line endpoint (start or end vertex). More... | |
bool | hasMiddleSegment () const |
Returns true if the Match is the middle of a segment. More... | |
bool | hasVertex () const |
Returns true if the Match is a vertex. More... | |
QgsPoint | interpolatedPoint (const QgsCoordinateReferenceSystem &destinationCrs=QgsCoordinateReferenceSystem()) const |
Convenient method to return a point on an edge with linear interpolation of the Z value. More... | |
bool | isValid () const |
QgsVectorLayer * | layer () const |
The vector layer where the snap occurred. More... | |
bool | operator== (const QgsPointLocator::Match &other) const |
QgsPointXY | point () const |
for vertex / edge match coords depending on what class returns it (geom.cache: layer coords, map canvas snapper: dest coords) More... | |
QgsPointLocator::Type | type () const |
int | vertexIndex () const |
for vertex / edge match (first vertex of the edge) More... | |
Protected Attributes | |
QgsPointXY | mCentroid |
double | mDist = 0 |
QgsPointXY | mEdgePoints [2] |
QgsFeatureId | mFid = 0 |
QgsVectorLayer * | mLayer = nullptr |
QgsPointXY | mMiddleOfSegment |
QgsPointXY | mPoint |
Type | mType = Invalid |
int | mVertexIndex = 0 |
Definition at line 187 of file qgspointlocator.h.
|
default |
construct invalid match
|
inline |
Definition at line 192 of file qgspointlocator.h.
|
inline |
for vertex / edge match units depending on what class returns it (geom.cache: layer units, map canvas snapper: dest crs units)
Definition at line 232 of file qgspointlocator.h.
|
inline |
Only for a valid edge match - obtain endpoints of the edge.
Definition at line 255 of file qgspointlocator.h.
|
inline |
The id of the feature to which the snapped geometry belongs.
Definition at line 252 of file qgspointlocator.h.
|
inline |
Returns true
if the Match is an area.
Definition at line 217 of file qgspointlocator.h.
|
inline |
Returns true
if the Match is a centroid.
Definition at line 215 of file qgspointlocator.h.
|
inline |
Returns true
if the Match is an edge.
Definition at line 213 of file qgspointlocator.h.
|
inline |
Returns true
if the Match is a line endpoint (start or end vertex).
Definition at line 226 of file qgspointlocator.h.
|
inline |
Returns true
if the Match is the middle of a segment.
Definition at line 219 of file qgspointlocator.h.
|
inline |
Returns true
if the Match is a vertex.
Definition at line 211 of file qgspointlocator.h.
|
inline |
Convenient method to return a point on an edge with linear interpolation of the Z value.
The parameter destinationCrs depends of where the instance of this Match is created (geom.cache: layer CRS, map canvas snapper: dest CRS)
Definition at line 267 of file qgspointlocator.h.
|
inline |
Definition at line 209 of file qgspointlocator.h.
|
inline |
The vector layer where the snap occurred.
Will be nullptr
if the snap happened on an intersection.
Definition at line 247 of file qgspointlocator.h.
|
inline |
Definition at line 312 of file qgspointlocator.h.
|
inline |
for vertex / edge match coords depending on what class returns it (geom.cache: layer coords, map canvas snapper: dest coords)
Definition at line 238 of file qgspointlocator.h.
|
inline |
Definition at line 207 of file qgspointlocator.h.
|
inline |
for vertex / edge match (first vertex of the edge)
Definition at line 241 of file qgspointlocator.h.
|
protected |
Definition at line 333 of file qgspointlocator.h.
|
protected |
Definition at line 327 of file qgspointlocator.h.
|
protected |
Definition at line 332 of file qgspointlocator.h.
|
protected |
Definition at line 330 of file qgspointlocator.h.
|
protected |
Definition at line 329 of file qgspointlocator.h.
|
protected |
Definition at line 334 of file qgspointlocator.h.
|
protected |
Definition at line 328 of file qgspointlocator.h.
Definition at line 326 of file qgspointlocator.h.
|
protected |
Definition at line 331 of file qgspointlocator.h.