Skip to content

Commit

Permalink
Explicitly mention in docs that presence of destination CRS does
Browse files Browse the repository at this point in the history
not affect filter expressions or virtual field values
  • Loading branch information
nyalldawson committed Jun 8, 2017
1 parent e437812 commit 482ed3f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/core/qgsfeaturerequest.sip
Expand Up @@ -568,6 +568,15 @@ Set a subset of attributes by names that will be fetched
set on the request is expected to be in the same CRS as the destination
CRS.

The feature geometry transformation to the destination CRS is performed
after all filter expressions are tested and any virtual fields are
calculated. Accordingly, any geometric expressions used in
filterExpression() will be performed in the original
source CRS. This ensures consistent results are returned regardless of the
destination CRS. Similarly, virtual field values will be calculated using the
original geometry in the source CRS, so these values are not affected by
any destination CRS transform present in the feature request.

.. seealso:: destinationCrs()
.. versionadded:: 3.0
:rtype: QgsFeatureRequest
Expand Down
9 changes: 9 additions & 0 deletions src/core/qgsfeaturerequest.h
Expand Up @@ -522,6 +522,15 @@ class CORE_EXPORT QgsFeatureRequest
* set on the request is expected to be in the same CRS as the destination
* CRS.
*
* The feature geometry transformation to the destination CRS is performed
* after all filter expressions are tested and any virtual fields are
* calculated. Accordingly, any geometric expressions used in
* filterExpression() will be performed in the original
* source CRS. This ensures consistent results are returned regardless of the
* destination CRS. Similarly, virtual field values will be calculated using the
* original geometry in the source CRS, so these values are not affected by
* any destination CRS transform present in the feature request.
*
* \see destinationCrs()
* \since QGIS 3.0
*/
Expand Down

0 comments on commit 482ed3f

Please sign in to comment.