Skip to content
Permalink
Browse files

Fix qgis_core python and project loading with point cloud layer

  • Loading branch information
wonder-sk authored and nyalldawson committed Oct 26, 2020
1 parent b796dbb commit a86149b452d123efbcaa79f15712f5922f9bc212
@@ -29,7 +29,28 @@ Represents a map layer supporting display of point clouds
%End
public:

explicit QgsPointCloudLayer( const QString &path = QString(), const QString &baseName = QString() );
struct LayerOptions
{

explicit LayerOptions( const QgsCoordinateTransformContext &transformContext = QgsCoordinateTransformContext( ) );
%Docstring
Constructor for LayerOptions with optional ``transformContext``.

.. note::

transformContext argument was added in QGIS 3.8
%End

QgsCoordinateTransformContext transformContext;

bool skipCrsValidation;
};


explicit QgsPointCloudLayer( const QString &path = QString(),
const QString &baseName = QString(),
const QString &providerLib = QStringLiteral( "pointcloud" ),
const QgsPointCloudLayer::LayerOptions &options = QgsPointCloudLayer::LayerOptions());
%Docstring
Constructor - creates a point cloud layer
%End
@@ -32,9 +32,8 @@
class QgsRenderContext;
class QgsPointCloudLayer;

#ifndef SIP_RUN

class QgsPointCloudRendererConfig
class CORE_EXPORT QgsPointCloudRendererConfig
{
public:
QgsPointCloudRendererConfig();
@@ -60,7 +59,6 @@ class QgsPointCloudRendererConfig
std::unique_ptr<QgsColorRamp> mColorRamp;
};

#endif


/**
@@ -63,6 +63,7 @@
#include "qgsvectortilelayer.h"
#include "qgsruntimeprofiler.h"
#include "qgsannotationlayer.h"
#include "qgspointcloudlayer.h"

#include <algorithm>
#include <QApplication>
@@ -1151,6 +1152,10 @@ bool QgsProject::addLayer( const QDomElement &layerElem, QList<QDomNode> &broken
{
mapLayer = qgis::make_unique<QgsVectorTileLayer>();
}
else if ( type == QLatin1String( "point-cloud" ) )
{
mapLayer = qgis::make_unique<QgsPointCloudLayer>();
}
else if ( type == QLatin1String( "plugin" ) )
{
QString typeName = layerElem.attribute( QStringLiteral( "name" ) );

0 comments on commit a86149b

Please sign in to comment.
You can’t perform that action at this time.