19#include "moc_qgseptpointcloudblockrequest.cpp"
40 QNetworkRequest nr = QNetworkRequest( QUrl( mUri ) );
43 nr.setAttribute( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache );
44 nr.setAttribute( QNetworkRequest::CacheSaveControlAttribute,
true );
49void QgsEptPointCloudBlockRequest::blockFinishedLoading()
58 if ( mDataType == QLatin1String(
"binary" ) )
62 else if ( mDataType == QLatin1String(
"zstandard" ) )
66 else if ( mDataType == QLatin1String(
"laszip" ) )
72 error = QStringLiteral(
"Unknown data type %1;" ).arg( mDataType );
82 catch ( std::exception &e )
84 error = QStringLiteral(
"Decompression error: %1" ).arg( e.what() );
91 if ( !error.isEmpty() )
93 mErrorStr = QStringLiteral(
"Error loading point cloud tile %1: \" %2 \"" ).arg(
mNode.
toString(), error );
static QgsTileDownloadManager * tileDownloadManager()
Returns the application's tile download manager, used for download of map tiles when rendering.
QgsEptPointCloudBlockRequest(const QgsPointCloudNodeId &node, const QString &Uri, const QString &dataType, const QgsPointCloudAttributeCollection &attributes, const QgsPointCloudAttributeCollection &requestedAttributes, const QgsVector3D &scale, const QgsVector3D &offset, const QgsPointCloudExpression &filterExpression, const QgsRectangle &filterRect)
QgsPointCloudBlockRequest constructor Requests the block data of size blockSize at offset blockOffset...
Collection of point cloud attributes.
Base class for handling loading QgsPointCloudBlock asynchronously.
QgsPointCloudAttributeCollection mRequestedAttributes
std::unique_ptr< QgsTileDownloadManagerReply > mTileDownloadManagerReply
QgsPointCloudAttributeCollection mAttributes
std::unique_ptr< QgsPointCloudBlock > mBlock
QgsPointCloudNodeId mNode
QgsPointCloudExpression mFilterExpression
void finished()
Emitted when the request processing has finished.
static void storeNodeDataToCacheStatic(QgsPointCloudBlock *data, const QgsPointCloudNodeId &node, const QgsPointCloudRequest &request, const QgsPointCloudExpression &expression, const QString &uri)
Stores existing data to the cache for the specified node, request, expression and uri.
Represents a indexed point cloud node's position in octree.
QString toString() const
Encode node to string.
Point cloud data request.
void setFilterRect(QgsRectangle extent)
Sets the rectangle from which points will be taken, in point cloud's crs.
void setAttributes(const QgsPointCloudAttributeCollection &attributes)
Set attributes filter in the request.
A rectangle specified with double values.
void finished()
Emitted when the reply has finished (either with a success or with a failure)
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
#define QgsSetRequestInitiatorClass(request, _class)
#define QgsSetRequestInitiatorId(request, str)