[Qgis-user] How to use spatial filtering in dataprovider filter
Bo Victor Thomsen
bo.victor.thomsen at gmail.com
Wed Apr 10 02:00:43 PDT 2019
Hi all -
Im am experimenting with using the dataprovider based *spatial* filtering
in QGIS
For example: with a Postgres based datasource I can write a filter like
this:
ST_Intersects( "geometry", ST_GeomFromText(' Polygon ((582084. 6143051.
...... lots of coordinates ... 582084. 6143051.))', 25832))
This will show a layer that only contains objects which actually intersects
with the text defined polygon even if the unfiltered datasource contains a
large number of objects taht does not intersect withe the text polygon
Something similar can be done with SQLserver to: mygeom.ST_Intersects
(...) = 1
But what about ogr file based vector sources like tab or shape files ?
You can define a *alfanumerical* filter like this : "myfield" > 27 to a
ogr file datasource. Works like a charm.
But what about *spatial filtering* ? Iv'e tried to use the same expression
like the postgres one but on a shapefile. I don't get any errors :-).
However the filter function doesn't work and let all objects through the
filter :-(
What am I doing wrong with the file based spatial filtering? Or is it
simply impossible ?
--
Med venlig hilsen
Bo Victor Thomsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190410/b6a0d3e1/attachment.html>
More information about the Qgis-user
mailing list