Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial implementation of remote ept
- Loading branch information
1 parent
b695f06
commit e870065
Showing
15 changed files
with
879 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ has been processed. | |
Called to start the download | ||
%End | ||
|
||
protected: | ||
public: | ||
~QgsFileDownloader(); | ||
|
||
}; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "qgspointcloudblockhandle.h" | ||
|
||
#include "qgstiledownloadmanager.h" | ||
#include "qgseptdecoder.h" | ||
|
||
// | ||
// QgsPointCloudBlockHandle | ||
// | ||
|
||
///@cond PRIVATE | ||
|
||
QgsPointCloudBlockHandle::QgsPointCloudBlockHandle( const QString &dataType, const QgsPointCloudAttributeCollection &attributes, const QgsPointCloudAttributeCollection &requestedAttributes, QgsTileDownloadManagerReply *tileDownloadManagerReply ) | ||
: mDataType( dataType ), mAttributes( attributes ), mRequestedAttributes( requestedAttributes ), mTileDownloadManagetReply( tileDownloadManagerReply ) | ||
{ | ||
connect( mTileDownloadManagetReply, &QgsTileDownloadManagerReply::finished, this, &QgsPointCloudBlockHandle::blockFinishedLoading ); | ||
} | ||
|
||
void QgsPointCloudBlockHandle::blockFinishedLoading() | ||
{ | ||
if ( mTileDownloadManagetReply->error() == QNetworkReply::NetworkError::NoError ) | ||
{ | ||
QgsPointCloudBlock *block = nullptr; | ||
if ( mDataType == QLatin1String( "binary" ) ) | ||
{ | ||
block = QgsEptDecoder::decompressBinary( mTileDownloadManagetReply->data(), mAttributes, mRequestedAttributes ); | ||
} | ||
else if ( mDataType == QLatin1String( "zstandard" ) ) | ||
{ | ||
block = QgsEptDecoder::decompressZStandard( mTileDownloadManagetReply->data(), mAttributes, mRequestedAttributes ); | ||
} | ||
else if ( mDataType == QLatin1String( "laszip" ) ) | ||
{ | ||
block = QgsEptDecoder::decompressLaz( mTileDownloadManagetReply->data(), mAttributes, mRequestedAttributes ); | ||
} | ||
if ( block == nullptr ) | ||
emit blockLoadingFailed( QStringLiteral( "unknown data type %1;" ).arg( mDataType ) + mTileDownloadManagetReply->errorString() ); | ||
else | ||
emit blockLoadingSucceeded( block ); | ||
} | ||
else | ||
{ | ||
emit blockLoadingFailed( mTileDownloadManagetReply->errorString() ); | ||
} | ||
} | ||
|
||
///@endcond |
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,29 @@ | ||
#ifndef QGSPOINTCLOUDBLOCKHANDLE_H | ||
#define QGSPOINTCLOUDBLOCKHANDLE_H | ||
|
||
#include <QObject> | ||
|
||
#include "qgspointcloudattribute.h" | ||
|
||
class QgsTileDownloadManagerReply; | ||
class QgsPointCloudAttributeCollection; | ||
class QgsPointCloudBlock; | ||
|
||
class QgsPointCloudBlockHandle : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
QgsPointCloudBlockHandle( const QString &dataType, const QgsPointCloudAttributeCollection &attributes, const QgsPointCloudAttributeCollection &requestedAttributes, QgsTileDownloadManagerReply *tileDownloadManagerReply ); | ||
signals: | ||
void blockLoadingSucceeded( QgsPointCloudBlock *block ); | ||
void blockLoadingFailed( const QString &errorStr ); | ||
private: | ||
QString mDataType; | ||
QgsPointCloudAttributeCollection mAttributes; | ||
QgsPointCloudAttributeCollection mRequestedAttributes; | ||
QgsTileDownloadManagerReply *mTileDownloadManagetReply = nullptr; | ||
private slots: | ||
void blockFinishedLoading(); | ||
}; | ||
|
||
#endif // QGSPOINTCLOUDBLOCKHANDLE_H |
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.