forked from qgis/QGIS
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is an equivalent of the point cloud index class, with some notable differences: - The class is designed to be thread safe. There's a shallow copy QgsTiledMeshIndex class, which contains an implicitly shared QgsAbstractTiledMeshIndex object. Tiled mesh data providers will be accompanied by a concrete class of QgsAbstractTiledMeshIndex. - The QgsTiledMeshIndex class takes care of thread safety by protecting the underlying QgsAbstractTiledMeshIndex via a read/write lock - Callers can request tiled mesh nodes from the index by calling QgsTiledMeshIndex::getNodes along with a QgsTiledMeshRequest object. This will return the tree structure of nodes matching the request. Currently only geometric error based filtering is supported by QgsTiledMeshRequest, but bounding box based filtering will also be introduced. - Clients can request tile content by calling QgsTiledMeshIndex::retrieveContent. This will either return a cached version of the content (if available), or retrieve and cache the content for future retrieval. Currently this uses a custom caching mechanism, but this will be replaced in future with QgsTileDownloadManager. (Currently QgsTileDownloadManager lacks support for blocking gets which is required by the index to avoid use of local event loops) The api is implemented by the cesium tiles data provider, which builds the index dynamically as required from the underlying cesium tiles tileset.json definitions. (The node index is NOT built upfront in order to minimize memory requirements for large tilesets). Currently the cesium index implementation only handles single-file tilesets, with support for sub tilesets to be introduced later.
- Loading branch information
1 parent
1e49449
commit 05a2510
Showing
15 changed files
with
1,639 additions
and
28 deletions.
There are no files selected for viewing
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
79 changes: 79 additions & 0 deletions
79
python/core/auto_generated/tiledmesh/qgstiledmeshindex.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,79 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/tiledmesh/qgstiledmeshindex.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsTiledMeshIndex | ||
{ | ||
%Docstring(signature="appended") | ||
An index for tiled mesh data providers. | ||
|
||
This is a shallow copy, implicitly shared container for an underlying :py:class:`QgsAbstractTiledMeshIndex` | ||
implementation. | ||
|
||
The class is thread safe and can be used safely across multiple threads or transferred between | ||
threads. | ||
|
||
.. versionadded:: 3.34 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgstiledmeshindex.h" | ||
%End | ||
public: | ||
|
||
|
||
~QgsTiledMeshIndex(); | ||
|
||
QgsTiledMeshIndex( const QgsTiledMeshIndex &other ); | ||
%Docstring | ||
Copy constructor | ||
%End | ||
|
||
bool isValid() const; | ||
%Docstring | ||
Returns ``True`` if the index is valid. | ||
%End | ||
|
||
QgsTiledMeshNode rootNode() const; | ||
%Docstring | ||
Returns the root node for the index. | ||
%End | ||
|
||
QgsTiledMeshNode *getNodes( const QgsTiledMeshRequest &request ) /Factory/; | ||
%Docstring | ||
Returns a node tree containing all nodes matching the given ``request``. | ||
|
||
Caller takes ownership of the returned node. | ||
|
||
May return ``None`` if no data satisfies the request. | ||
%End | ||
|
||
QByteArray retrieveContent( const QString &uri, QgsFeedback *feedback = 0 ); | ||
%Docstring | ||
Retrieves index content for the specified ``uri``. | ||
|
||
The content is cached within the index, so multiple calls are potentially cost-free. | ||
|
||
The optional ``feedback`` argument can be used the cancel the request early. | ||
%End | ||
|
||
}; | ||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/tiledmesh/qgstiledmeshindex.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
77 changes: 77 additions & 0 deletions
77
python/core/auto_generated/tiledmesh/qgstiledmeshrequest.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,77 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/tiledmesh/qgstiledmeshrequest.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsTiledMeshRequest | ||
{ | ||
%Docstring(signature="appended") | ||
|
||
Tiled mesh data request. | ||
|
||
.. versionadded:: 3.34 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgstiledmeshrequest.h" | ||
%End | ||
public: | ||
|
||
QgsTiledMeshRequest(); | ||
|
||
double requiredGeometricError() const; | ||
%Docstring | ||
Returns the required geometric error treshold for the returned nodes, in | ||
mesh CRS units. | ||
|
||
If the error is 0 then no geometric error filtering will be applied. | ||
|
||
.. seealso:: :py:func:`setRequiredGeometricError` | ||
%End | ||
|
||
void setRequiredGeometricError( double error ); | ||
%Docstring | ||
Sets the required geometric ``error`` treshold for the returned nodes, in | ||
mesh CRS units. | ||
|
||
If the ``error`` is 0 then no geometric error filtering will be applied. | ||
|
||
.. seealso:: :py:func:`requiredGeometricError` | ||
%End | ||
|
||
void setFeedback( QgsFeedback *feedback ); | ||
%Docstring | ||
Attach a ``feedback`` object that can be queried regularly by the request to check | ||
if it should be canceled. | ||
|
||
Ownership of ``feedback`` is NOT transferred, and the caller must take care that it exists | ||
for the lifetime of the request. | ||
|
||
.. seealso:: :py:func:`feedback` | ||
%End | ||
|
||
QgsFeedback *feedback() const; | ||
%Docstring | ||
Returns the feedback object that can be queried regularly by the request to check | ||
if it should be canceled, if set. | ||
|
||
.. seealso:: :py:func:`setFeedback` | ||
%End | ||
|
||
}; | ||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/tiledmesh/qgstiledmeshrequest.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
Oops, something went wrong.