Skip to content
Permalink
Browse files

Some build fixes

  • Loading branch information
nyalldawson committed Apr 17, 2019
1 parent bfe92c4 commit 8ae914387a0baa760bfdcea7d4edb6b0448564cc
@@ -27,7 +27,7 @@ QgsDemTerrainGenerator::~QgsDemTerrainGenerator()
void QgsDemTerrainGenerator::setLayer( QgsRasterLayer *layer )
{
mLayer = QgsMapLayerRef( layer );
updateGenerator( mTransformContext );
updateGenerator();
}

QgsRasterLayer *QgsDemTerrainGenerator::layer() const
@@ -39,7 +39,7 @@ void QgsDemTerrainGenerator::setCrs( const QgsCoordinateReferenceSystem &crs, co
{
mCrs = crs;
mTransformContext = context;
updateGenerator( context );
updateGenerator();
}

QgsTerrainGenerator *QgsDemTerrainGenerator::clone() const
@@ -49,7 +49,7 @@ QgsTerrainGenerator *QgsDemTerrainGenerator::clone() const
cloned->mLayer = mLayer;
cloned->mResolution = mResolution;
cloned->mSkirtHeight = mSkirtHeight;
cloned->updateGenerator( mTransformContext );
cloned->updateGenerator();
return cloned;
}

@@ -93,15 +93,15 @@ void QgsDemTerrainGenerator::readXml( const QDomElement &elem )
void QgsDemTerrainGenerator::resolveReferences( const QgsProject &project )
{
mLayer = QgsMapLayerRef( project.mapLayer( mLayer.layerId ) );
updateGenerator( project.transformContext() );
updateGenerator();
}

QgsChunkLoader *QgsDemTerrainGenerator::createChunkLoader( QgsChunkNode *node ) const
{
return new QgsDemTerrainTileLoader( mTerrain, node );
}

void QgsDemTerrainGenerator::updateGenerator( const QgsCoordinateTransformContext &transformContext )
void QgsDemTerrainGenerator::updateGenerator()
{
QgsRasterLayer *dem = layer();
if ( dem )
@@ -112,7 +112,7 @@ void QgsDemTerrainGenerator::updateGenerator( const QgsCoordinateTransformContex

mTerrainTilingScheme = QgsTilingScheme( te, mCrs );
delete mHeightMapGenerator;
mHeightMapGenerator = new QgsDemHeightMapGenerator( dem, mTerrainTilingScheme, mResolution, transformContext );
mHeightMapGenerator = new QgsDemHeightMapGenerator( dem, mTerrainTilingScheme, mResolution, mTransformContext );
}
else
{
@@ -72,7 +72,7 @@ class _3D_EXPORT QgsDemTerrainGenerator : public QgsTerrainGenerator
QgsChunkLoader *createChunkLoader( QgsChunkNode *node ) const override SIP_FACTORY;

private:
void updateGenerator( const QgsCoordinateTransformContext &transformContext );
void updateGenerator();

QgsDemHeightMapGenerator *mHeightMapGenerator = nullptr;

@@ -113,5 +113,5 @@ void QgsOnlineTerrainGenerator::updateGenerator()
mTerrainTilingScheme = QgsTilingScheme( mExtent, mCrs );
}

mHeightMapGenerator.reset( new QgsDemHeightMapGenerator( nullptr, mTerrainTilingScheme, mResolution ) );
mHeightMapGenerator.reset( new QgsDemHeightMapGenerator( nullptr, mTerrainTilingScheme, mResolution, mTransformContext ) );
}
@@ -6237,7 +6237,7 @@ void TestQgsProcessing::checkParamValues()
void TestQgsProcessing::combineLayerExtent()
{
QgsProcessingContext context;
QgsRectangle ext = QgsProcessingUtils::combineLayerExtents( QList< QgsMapLayer *>(), context );
QgsRectangle ext = QgsProcessingUtils::combineLayerExtents( QList< QgsMapLayer *>(), QgsCoordinateReferenceSystem(), context );
QVERIFY( ext.isNull() );

QString testDataDir = QStringLiteral( TEST_DATA_DIR ) + '/'; //defined in CmakeLists.txt
@@ -6249,13 +6249,13 @@ void TestQgsProcessing::combineLayerExtent()
QFileInfo fi2( raster2 );
std::unique_ptr< QgsRasterLayer > r2( new QgsRasterLayer( fi2.filePath(), "R2" ) );

ext = QgsProcessingUtils::combineLayerExtents( QList< QgsMapLayer *>() << r1.get(), context );
ext = QgsProcessingUtils::combineLayerExtents( QList< QgsMapLayer *>() << r1.get(), QgsCoordinateReferenceSystem(), context );
QGSCOMPARENEAR( ext.xMinimum(), 1535375.000000, 10 );
QGSCOMPARENEAR( ext.xMaximum(), 1535475, 10 );
QGSCOMPARENEAR( ext.yMinimum(), 5083255, 10 );
QGSCOMPARENEAR( ext.yMaximum(), 5083355, 10 );

ext = QgsProcessingUtils::combineLayerExtents( QList< QgsMapLayer *>() << r1.get() << r2.get(), context );
ext = QgsProcessingUtils::combineLayerExtents( QList< QgsMapLayer *>() << r1.get() << r2.get(), QgsCoordinateReferenceSystem(), context );
QGSCOMPARENEAR( ext.xMinimum(), 781662, 10 );
QGSCOMPARENEAR( ext.xMaximum(), 1535475, 10 );
QGSCOMPARENEAR( ext.yMinimum(), 3339523, 10 );

0 comments on commit 8ae9143

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