Skip to content
Permalink
Browse files

Improve documentation for QgsGeometry::closestVertex

  • Loading branch information
nyalldawson committed Apr 6, 2016
1 parent 5247673 commit 3a1f6c429d0079f9d187a37690d70d68b8f949b0
Showing with 22 additions and 4 deletions.
  1. +11 −2 python/core/geometry/qgsgeometry.sip
  2. +11 −2 src/core/geometry/qgsgeometry.h
@@ -171,8 +171,17 @@ class QgsGeometry

/**
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
* and the indices of the vertices before/after. The vertices before/after are -1 if not present
*/
* and the indices of the vertices before and after the closest vertex.
* @param point point to search for
* @param atVertex will be set to the vertex index of the closest found vertex
* @param beforeVertex will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
* not present.
* @param afterVertex will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
* not present.
* @param sqrDist will be set to the square distance between the closest vertex and the specified point
* @returns closest point in geometry
*/
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ ) const;

/**
@@ -213,8 +213,17 @@ class CORE_EXPORT QgsGeometry

/**
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
* and the indices of the vertices before/after. The vertices before/after are -1 if not present
*/
* and the indices of the vertices before and after the closest vertex.
* @param point point to search for
* @param atVertex will be set to the vertex index of the closest found vertex
* @param beforeVertex will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
* not present.
* @param afterVertex will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
* not present.
* @param sqrDist will be set to the square distance between the closest vertex and the specified point
* @returns closest point in geometry
*/
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
QgsPoint closestVertex( const QgsPoint& point, int& atVertex, int& beforeVertex, int& afterVertex, double& sqrDist ) const;

/**

0 comments on commit 3a1f6c4

Please sign in to comment.
You can’t perform that action at this time.