[Qgis-user] Virtual Layer query with "currentExtent" not working anymore

Andrea Giudiceandrea andreaerdna at libero.it
Wed Jan 19 04:00:04 PST 2022


> Bernd Vogelgesang 
> <https://www.mail-archive.com/search?l=qgis-user@lists.osgeo.org&q=from:%22Bernd+Vogelgesang%22>Wed, 
> 19 Jan 2022 03:34:05 -0800 
> <https://www.mail-archive.com/search?l=qgis-user@lists.osgeo.org&q=date:20220119>
>
> A while ago, I figured out how to limit a query on a layer by the
> current map extent as a preparation for another query:
> SELECT * FROM ASK_Geometrien WHERE
> st_intersects(ASK_Geometrien.geometry, currentExtent());
>
> Now, when I try it again later, the test fails with "no such function:
> currentExtent"

Hi Bernd,
AFAIK there is no currentExtent() inbuilt function.

You need to define a custom currentExtent() function that returns the 
current extent.

Please see, for example: 
https://gis.stackexchange.com/questions/303325/how-to-speed-up-a-query-in-a-virtual-layer-of-qgis

Best regards.

Andrea Giudiceandrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220119/6000c574/attachment.html>


More information about the Qgis-user mailing list