Skip to content

Commit 482ed3f

Browse files
committed
Explicitly mention in docs that presence of destination CRS does
not affect filter expressions or virtual field values
1 parent e437812 commit 482ed3f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

python/core/qgsfeaturerequest.sip

+9
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,15 @@ Set a subset of attributes by names that will be fetched
568568
set on the request is expected to be in the same CRS as the destination
569569
CRS.
570570

571+
The feature geometry transformation to the destination CRS is performed
572+
after all filter expressions are tested and any virtual fields are
573+
calculated. Accordingly, any geometric expressions used in
574+
filterExpression() will be performed in the original
575+
source CRS. This ensures consistent results are returned regardless of the
576+
destination CRS. Similarly, virtual field values will be calculated using the
577+
original geometry in the source CRS, so these values are not affected by
578+
any destination CRS transform present in the feature request.
579+
571580
.. seealso:: destinationCrs()
572581
.. versionadded:: 3.0
573582
:rtype: QgsFeatureRequest

src/core/qgsfeaturerequest.h

+9
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,15 @@ class CORE_EXPORT QgsFeatureRequest
522522
* set on the request is expected to be in the same CRS as the destination
523523
* CRS.
524524
*
525+
* The feature geometry transformation to the destination CRS is performed
526+
* after all filter expressions are tested and any virtual fields are
527+
* calculated. Accordingly, any geometric expressions used in
528+
* filterExpression() will be performed in the original
529+
* source CRS. This ensures consistent results are returned regardless of the
530+
* destination CRS. Similarly, virtual field values will be calculated using the
531+
* original geometry in the source CRS, so these values are not affected by
532+
* any destination CRS transform present in the feature request.
533+
*
525534
* \see destinationCrs()
526535
* \since QGIS 3.0
527536
*/

0 commit comments

Comments
 (0)