[Qgis-user] How to filter shape or oracle layer

Dario C dario955i at gmail.com
Thu Jun 10 12:39:12 PDT 2021


Thank you. I appreciate it

Il giorno gio 10 giu 2021 alle ore 21:26 Andrea Giudiceandrea <
andreaerdna at libero.it> ha scritto:

> Dario C wrote
> > this is the error message:
>
> The error confirms that your layer provider doesn't support the function
> used in your expression.
> Your expression works for a memory layer, instead.
>
> AFAIK you couldn't directly perform a spatial filtering for an ESRI
> Shapefile layer. I don't know if it is possible for an Oracle layer.
>
>
> Anyway you could create a virtual layer based on an SQL query like:
>
>
> select a.* from 'your_layer_name' a, 'your_filter_layer' b
> where b."ID" = '2' and st_contains(b.geometry, a.geometry)
>
>
> replacing your_layer_name and your_filter_layer with the name of your
> layers.
>
> The query presumes that the geometry columns of the two layer are called
> 'geometry': if not, change them accordingly.
>
> Hope someone else could share light on how the oracle provider works, and
> if
> it is possible to directly use a spatial filter for Shapefile or Oracle
> layers.
>
> Regards.
>
> Andrea
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210610/dc32b618/attachment.html>


More information about the Qgis-user mailing list