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

Халилов Артур Фирдусович af.halilov at unistroyrf.ru
Wed Jan 19 04:10:48 PST 2022


Good afternoon,
how do I unsubscribe from the mailing list?

Sincerely,
Khalilov Artur

From: Qgis-user <qgis-user-bounces at lists.osgeo.org> On Behalf Of Andrea Giudiceandrea
Sent: Wednesday, January 19, 2022 3:00 PM
To: qgis-user at lists.osgeo.org
Subject: [Qgis-user] Virtual Layer query with "currentExtent" not working anymore


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/909adfc3/attachment.html>


More information about the Qgis-user mailing list