Skip to content

Commit

Permalink
[3d] Fix reprojection of features shows no features
Browse files Browse the repository at this point in the history
When setting the filter rect for a request with a destination CRS set,
the filter rect should already be set in the same CRS as the
destination CRS (as per the QgsFeatureRequest dox).

Avoid double-reprojection of request filter rect

Fixes #34824
  • Loading branch information
nyalldawson committed Jun 8, 2020
1 parent 7aefaf4 commit 62bd026
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/3d/qgsrulebasedchunkloader_p.cpp
Expand Up @@ -66,7 +66,7 @@ QgsRuleBasedChunkLoader::QgsRuleBasedChunkLoader( const QgsRuleBasedChunkLoaderF
req.setSubsetOfAttributes( attributeNames, layer->fields() );

// only a subset of data to be queried
QgsRectangle rect = Qgs3DUtils::worldToLayerExtent( node->bbox(), mFactory->mLayer->crs(), map.origin(), map.crs(), map.transformContext() );
QgsRectangle rect = Qgs3DUtils::worldToMapExtent( node->bbox(), map.origin() );
req.setFilterRect( rect );

//
Expand Down
2 changes: 1 addition & 1 deletion src/3d/qgsvectorlayerchunkloader_p.cpp
Expand Up @@ -84,7 +84,7 @@ QgsVectorLayerChunkLoader::QgsVectorLayerChunkLoader( const QgsVectorLayerChunkL
req.setSubsetOfAttributes( attributeNames, layer->fields() );

// only a subset of data to be queried
QgsRectangle rect = Qgs3DUtils::worldToLayerExtent( node->bbox(), mFactory->mLayer->crs(), map.origin(), map.crs(), map.transformContext() );
QgsRectangle rect = Qgs3DUtils::worldToMapExtent( node->bbox(), map.origin() );
req.setFilterRect( rect );

//
Expand Down

0 comments on commit 62bd026

Please sign in to comment.