34 uint64_t blockOffset, int32_t blockSize,
int pointCount,
const QgsLazInfo &lazInfo )
36 mBlockOffset( blockOffset ), mBlockSize( blockSize ), mPointCount( pointCount ), mLazInfo( lazInfo )
38 QNetworkRequest nr( mUri );
39 nr.setAttribute( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache );
40 nr.setAttribute( QNetworkRequest::CacheSaveControlAttribute,
true );
42 QByteArray queryRange = QStringLiteral(
"bytes=%1-%2" ).arg( mBlockOffset ).arg( ( int64_t ) mBlockOffset + mBlockSize - 1 ).toLocal8Bit();
43 nr.setRawHeader(
"Range", queryRange );
49 void QgsCopcPointCloudBlockRequest::blockFinishedLoading()
57 error = QStringLiteral(
"Returned HTTP range is incorrect, requested %1 bytes but got %2 bytes" ).arg( mBlockSize ).arg(
mTileDownloadManagerReply->data().size() );
65 catch ( std::exception &e )
67 error = QStringLiteral(
"Decompression error: %1" ).arg( e.what() );
75 if ( !error.isEmpty() )