Skip to content
Permalink
Browse files

[3d] Fix reprojection of features shows no features

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 62bd0267439a65f94a5cd9cb886bbb4e4780cdf0
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/3d/qgsrulebasedchunkloader_p.cpp
  2. +1 −1 src/3d/qgsvectorlayerchunkloader_p.cpp
@@ -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 );

//
@@ -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 );

//

0 comments on commit 62bd026

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