-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expose mesh spatial index similarly to vector spatial index to API. f…
…ix travis issues and documentation
- Loading branch information
1 parent
9d4d1c9
commit 27c670e
Showing
8 changed files
with
113 additions
and
98 deletions.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
python/core/auto_generated/mesh/qgsmeshspatialindex.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/mesh/qgsmeshspatialindex.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsMeshSpatialIndex | ||
{ | ||
%Docstring | ||
|
||
A spatial index for QgsMeshFace objects. | ||
|
||
QgsMeshSpatialIndex objects are implicitly shared and can be inexpensively copied. | ||
|
||
.. note:: | ||
|
||
While the underlying libspatialindex is not thread safe on some platforms, the QgsMeshSpatialIndex | ||
class implements its own locks and accordingly, a single QgsMeshSpatialIndex object can safely | ||
be used across multiple threads | ||
|
||
.. seealso:: :py:class:`QgsSpatialIndex` | ||
|
||
|
||
.. versionadded:: 3.6 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsmeshspatialindex.h" | ||
%End | ||
public: | ||
|
||
QgsMeshSpatialIndex(); | ||
%Docstring | ||
Constructor for :py:class:`QgsSpatialIndex`. Creates an empty R-tree index. | ||
%End | ||
|
||
explicit QgsMeshSpatialIndex( const QgsMesh &triangularMesh, QgsFeedback *feedback = 0 ); | ||
%Docstring | ||
Constructor - creates R-tree and bulk loads faces from the specified mesh | ||
|
||
The optional ``feedback`` object can be used to allow cancelation of bulk face loading. Ownership | ||
of ``feedback`` is not transferred, and callers must take care that the lifetime of feedback exceeds | ||
that of the spatial index construction. | ||
%End | ||
|
||
QgsMeshSpatialIndex( const QgsMeshSpatialIndex &other ); | ||
%Docstring | ||
Copy constructor | ||
%End | ||
|
||
~QgsMeshSpatialIndex(); | ||
|
||
|
||
QList<int> intersects( const QgsRectangle &rectangle ) const; | ||
%Docstring | ||
Returns a list of face ids with a bounding box which intersects the specified ``rectangle``. | ||
|
||
.. note:: | ||
|
||
The intersection test is performed based on the face bounding boxes only, so it is necessary | ||
to manually test the returned faces for exact geometry intersection when required. | ||
%End | ||
|
||
QList<int> nearestNeighbor( const QgsPointXY &point, int neighbors ) const; | ||
%Docstring | ||
Returns nearest neighbors to a ``point``. The number of neighbours returned is specified | ||
by the ``neighbours`` argument. | ||
|
||
.. note:: | ||
|
||
The nearest neighbour test is performed based on the face bounding boxes only, | ||
so this method is not guaranteed to return the actual closest neighbours. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/mesh/qgsmeshspatialindex.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters