Skip to content
Permalink
Browse files

Add hacky way to configure 2d renderer via layer custom properties fo…

…r now
  • Loading branch information
nyalldawson committed Oct 26, 2020
1 parent 9796602 commit 422a16399e5dcaed66cb874574a3d8c7ffcea694
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/core/pointcloud/qgspointcloudrenderer.cpp
@@ -97,12 +97,9 @@ QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer( QgsPointCloudLayer *laye
// TODO: use config from layer
mConfig.setPenWidth( context.convertToPainterUnits( 1, QgsUnitTypes::RenderUnit::RenderMillimeters ) );
// good range for 26850_12580.laz
mConfig.setZMin( 400 );
mConfig.setZMax( 600 );
// good range for Trencin castle
//mConfig.zMin = 150;
//mConfig.zMax = 350;
mConfig.setColorRamp( QgsStyle::defaultStyle()->colorRamp( "Viridis" ) );
mConfig.setZMin( layer->customProperty( QStringLiteral( "pcMin" ), 400 ).toInt() );
mConfig.setZMax( layer->customProperty( QStringLiteral( "pcMax" ), 600 ).toInt() );
mConfig.setColorRamp( QgsStyle::defaultStyle()->colorRamp( layer->customProperty( QStringLiteral( "pcRamp" ), QStringLiteral( "Viridis" ) ).toString() ) );
}

static QList<IndexedPointCloudNode> _traverseTree( QgsPointCloudIndex *pc, const QgsRectangle &extent, IndexedPointCloudNode n, int maxDepth )

0 comments on commit 422a163

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