mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
Merge pull request #60586 from dvdkon/pointcloudindex-remove-clone
Remove unused clone() method from QgsAbstractPointCloudIndex
This commit is contained in:
commit
ddf579a457
@ -53,14 +53,6 @@ QgsCopcPointCloudIndex::QgsCopcPointCloudIndex() = default;
|
|||||||
|
|
||||||
QgsCopcPointCloudIndex::~QgsCopcPointCloudIndex() = default;
|
QgsCopcPointCloudIndex::~QgsCopcPointCloudIndex() = default;
|
||||||
|
|
||||||
std::unique_ptr<QgsAbstractPointCloudIndex> QgsCopcPointCloudIndex::clone() const
|
|
||||||
{
|
|
||||||
QgsCopcPointCloudIndex *clone = new QgsCopcPointCloudIndex;
|
|
||||||
QMutexLocker locker( &mHierarchyMutex );
|
|
||||||
copyCommonProperties( clone );
|
|
||||||
return std::unique_ptr<QgsAbstractPointCloudIndex>( clone );
|
|
||||||
}
|
|
||||||
|
|
||||||
void QgsCopcPointCloudIndex::load( const QString &urlString )
|
void QgsCopcPointCloudIndex::load( const QString &urlString )
|
||||||
{
|
{
|
||||||
QUrl url = urlString;
|
QUrl url = urlString;
|
||||||
@ -432,22 +424,6 @@ QgsPointCloudNode QgsCopcPointCloudIndex::getNode( const QgsPointCloudNodeId &id
|
|||||||
return QgsPointCloudNode( id, pointCount, children, bounds.width() / mSpan, bounds );
|
return QgsPointCloudNode( id, pointCount, children, bounds.width() / mSpan, bounds );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsCopcPointCloudIndex::copyCommonProperties( QgsCopcPointCloudIndex *destination ) const
|
|
||||||
{
|
|
||||||
QgsAbstractPointCloudIndex::copyCommonProperties( destination );
|
|
||||||
|
|
||||||
// QgsCopcPointCloudIndex specific fields
|
|
||||||
destination->mIsValid = mIsValid;
|
|
||||||
destination->mAccessType = mAccessType;
|
|
||||||
destination->mUri = mUri;
|
|
||||||
if ( mAccessType == Qgis::PointCloudAccessType::Local )
|
|
||||||
destination->mCopcFile.open( QgsLazDecoder::toNativePath( mUri ), std::ios::binary );
|
|
||||||
destination->mCopcInfoVlr = mCopcInfoVlr;
|
|
||||||
destination->mHierarchyNodePos = mHierarchyNodePos;
|
|
||||||
destination->mOriginalMetadata = mOriginalMetadata;
|
|
||||||
destination->mLazInfo.reset( new QgsLazInfo( *mLazInfo ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray QgsCopcPointCloudIndex::readRange( uint64_t offset, uint64_t length ) const
|
QByteArray QgsCopcPointCloudIndex::readRange( uint64_t offset, uint64_t length ) const
|
||||||
{
|
{
|
||||||
if ( mAccessType == Qgis::PointCloudAccessType::Local )
|
if ( mAccessType == Qgis::PointCloudAccessType::Local )
|
||||||
|
@ -46,8 +46,6 @@ class CORE_EXPORT QgsCopcPointCloudIndex: public QgsAbstractPointCloudIndex
|
|||||||
explicit QgsCopcPointCloudIndex();
|
explicit QgsCopcPointCloudIndex();
|
||||||
~QgsCopcPointCloudIndex();
|
~QgsCopcPointCloudIndex();
|
||||||
|
|
||||||
std::unique_ptr<QgsAbstractPointCloudIndex> clone() const override;
|
|
||||||
|
|
||||||
void load( const QString &fileName ) override;
|
void load( const QString &fileName ) override;
|
||||||
|
|
||||||
bool hasNode( const QgsPointCloudNodeId &n ) const override;
|
bool hasNode( const QgsPointCloudNodeId &n ) const override;
|
||||||
@ -77,12 +75,6 @@ class CORE_EXPORT QgsCopcPointCloudIndex: public QgsAbstractPointCloudIndex
|
|||||||
*/
|
*/
|
||||||
QgsPointCloudStatistics metadataStatistics() const override;
|
QgsPointCloudStatistics metadataStatistics() const override;
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies common properties to the \a destination index
|
|
||||||
* \since QGIS 3.26
|
|
||||||
*/
|
|
||||||
void copyCommonProperties( QgsCopcPointCloudIndex *destination ) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns one datapoint, "CopcGpsTimeFlag": The gps time flag from global_encoding field in LAS header,
|
* Returns one datapoint, "CopcGpsTimeFlag": The gps time flag from global_encoding field in LAS header,
|
||||||
* 0 indicates GPS week time (seconds passed since the beginning of the week)
|
* 0 indicates GPS week time (seconds passed since the beginning of the week)
|
||||||
|
@ -55,14 +55,6 @@ QgsEptPointCloudIndex::QgsEptPointCloudIndex()
|
|||||||
|
|
||||||
QgsEptPointCloudIndex::~QgsEptPointCloudIndex() = default;
|
QgsEptPointCloudIndex::~QgsEptPointCloudIndex() = default;
|
||||||
|
|
||||||
std::unique_ptr<QgsAbstractPointCloudIndex> QgsEptPointCloudIndex::clone() const
|
|
||||||
{
|
|
||||||
QgsEptPointCloudIndex *clone = new QgsEptPointCloudIndex;
|
|
||||||
QMutexLocker locker( &mHierarchyMutex );
|
|
||||||
copyCommonProperties( clone );
|
|
||||||
return std::unique_ptr<QgsAbstractPointCloudIndex>( clone );
|
|
||||||
}
|
|
||||||
|
|
||||||
void QgsEptPointCloudIndex::load( const QString &urlString )
|
void QgsEptPointCloudIndex::load( const QString &urlString )
|
||||||
{
|
{
|
||||||
QUrl url = urlString;
|
QUrl url = urlString;
|
||||||
@ -651,23 +643,6 @@ Qgis::PointCloudAccessType QgsEptPointCloudIndex::accessType() const
|
|||||||
return mAccessType;
|
return mAccessType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsEptPointCloudIndex::copyCommonProperties( QgsEptPointCloudIndex *destination ) const
|
|
||||||
{
|
|
||||||
QgsAbstractPointCloudIndex::copyCommonProperties( destination );
|
|
||||||
|
|
||||||
// QgsEptPointCloudIndex specific fields
|
|
||||||
destination->mIsValid = mIsValid;
|
|
||||||
destination->mAccessType = mAccessType;
|
|
||||||
destination->mDataType = mDataType;
|
|
||||||
destination->mUrlDirectoryPart = mUrlDirectoryPart;
|
|
||||||
destination->mWkt = mWkt;
|
|
||||||
destination->mHierarchyNodes = mHierarchyNodes;
|
|
||||||
destination->mPointCount = mPointCount;
|
|
||||||
destination->mMetadataStats = mMetadataStats;
|
|
||||||
destination->mAttributeClasses = mAttributeClasses;
|
|
||||||
destination->mOriginalMetadata = mOriginalMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef PROVIDER_KEY
|
#undef PROVIDER_KEY
|
||||||
#undef PROVIDER_DESCRIPTION
|
#undef PROVIDER_DESCRIPTION
|
||||||
|
|
||||||
|
@ -41,8 +41,6 @@ class CORE_EXPORT QgsEptPointCloudIndex: public QgsAbstractPointCloudIndex
|
|||||||
explicit QgsEptPointCloudIndex();
|
explicit QgsEptPointCloudIndex();
|
||||||
~QgsEptPointCloudIndex();
|
~QgsEptPointCloudIndex();
|
||||||
|
|
||||||
std::unique_ptr<QgsAbstractPointCloudIndex> clone() const override;
|
|
||||||
|
|
||||||
void load( const QString &fileName ) override;
|
void load( const QString &fileName ) override;
|
||||||
|
|
||||||
std::unique_ptr<QgsPointCloudBlock> nodeData( const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request ) override;
|
std::unique_ptr<QgsPointCloudBlock> nodeData( const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request ) override;
|
||||||
@ -58,12 +56,6 @@ class CORE_EXPORT QgsEptPointCloudIndex: public QgsAbstractPointCloudIndex
|
|||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
Qgis::PointCloudAccessType accessType() const override;
|
Qgis::PointCloudAccessType accessType() const override;
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies common properties to the \a destination index
|
|
||||||
* \since QGIS 3.26
|
|
||||||
*/
|
|
||||||
void copyCommonProperties( QgsEptPointCloudIndex *destination ) const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool loadSchema( const QByteArray &dataJson );
|
bool loadSchema( const QByteArray &dataJson );
|
||||||
void loadManifest( const QByteArray &manifestJson );
|
void loadManifest( const QByteArray &manifestJson );
|
||||||
|
@ -47,11 +47,6 @@ QgsPointCloudEditingIndex::QgsPointCloudEditingIndex( QgsPointCloudLayer *layer
|
|||||||
mIsValid = true;
|
mIsValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<QgsAbstractPointCloudIndex> QgsPointCloudEditingIndex::clone() const
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QgsPointCloudEditingIndex::load( const QString & )
|
void QgsPointCloudEditingIndex::load( const QString & )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +39,6 @@ class CORE_EXPORT QgsPointCloudEditingIndex : public QgsAbstractPointCloudIndex
|
|||||||
//! Ctor
|
//! Ctor
|
||||||
explicit QgsPointCloudEditingIndex( QgsPointCloudLayer *layer );
|
explicit QgsPointCloudEditingIndex( QgsPointCloudLayer *layer );
|
||||||
|
|
||||||
std::unique_ptr<QgsAbstractPointCloudIndex> clone() const override;
|
|
||||||
void load( const QString &fileName ) override;
|
void load( const QString &fileName ) override;
|
||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
Qgis::PointCloudAccessType accessType() const override;
|
Qgis::PointCloudAccessType accessType() const override;
|
||||||
|
@ -218,13 +218,6 @@ class CORE_EXPORT QgsAbstractPointCloudIndex
|
|||||||
explicit QgsAbstractPointCloudIndex();
|
explicit QgsAbstractPointCloudIndex();
|
||||||
virtual ~QgsAbstractPointCloudIndex();
|
virtual ~QgsAbstractPointCloudIndex();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a clone of the current point cloud index object
|
|
||||||
* \note It is the responsibility of the caller to handle the ownership and delete the object.
|
|
||||||
* \since QGIS 3.26
|
|
||||||
*/
|
|
||||||
virtual std::unique_ptr<QgsAbstractPointCloudIndex> clone() const = 0;
|
|
||||||
|
|
||||||
//! Loads the index from the file
|
//! Loads the index from the file
|
||||||
virtual void load( const QString &fileName ) = 0;
|
virtual void load( const QString &fileName ) = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user