Skip to content

Commit 6bbcb3d

Browse files
enricoferm-kuhn
authored andcommittedJul 3, 2020
different crs reprojection code revision
1 parent d5f8adb commit 6bbcb3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/core/expression/qgsexpressionfunction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5696,9 +5696,9 @@ static QVariant executeGeomOverlay( const QVariantList &values, const QgsExpress
56965696
request.setFilterExpression( filterString ); //filter cached features
56975697
}
56985698

5699-
if (targetLayer->crs().authid() != sourceLayer->crs().authid())
5699+
if ( targetLayer->crs() != sourceLayer->crs() )
57005700
{
5701-
QgsCoordinateTransformContext TransformContext;
5701+
QgsCoordinateTransformContext TransformContext = context->variable( QStringLiteral( "_project_transform_context" ) ).value<QgsCoordinateTransformContext>();
57025702
request.setDestinationCrs(sourceLayer->crs(), TransformContext); //if crs are not the same, cached target will be reprojected to source crs
57035703
}
57045704

@@ -5790,7 +5790,7 @@ static QVariant indexedFilteredOverlay( QgsExpression &subExp, QgsExpressionCont
57905790
QVariantList results;
57915791
for ( QgsFeatureId id : targetFeatureIds )
57925792
{
5793-
if (!currentFeatId.isNull() && currentFeatId.toLongLong() == id)
5793+
if ( !currentFeatId.isNull() && currentFeatId.toLongLong() == id )
57945794
{
57955795
continue; //if sourceLayer and targetLayer are the same, current feature have to be excluded from spatial check
57965796
}

0 commit comments

Comments
 (0)
Please sign in to comment.