<div dir="ltr">for not spatial enable layers (e.g. without embedded spatial operators) AFAIK you should use create a qgis virtual layer or an external gdal vrt.<br><br><a href="http://www.sigte.udg.edu/jornadassiglibre2016/wp-content/uploads/2016/01/qgis_vlayers.pdf">http://www.sigte.udg.edu/jornadassiglibre2016/wp-content/uploads/2016/01/qgis_vlayers.pdf</a><div><a href="https://github.com/mhugo/qgis_vlayers/blob/master/README.md">https://github.com/mhugo/qgis_vlayers/blob/master/README.md</a><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div>Luigi Pirelli<br><br>**************************************************************************************************<br>* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br>* Mastering QGIS 2nd Edition:<br>* <a href="https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition" target="_blank">https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition</a><br>* Hire me: <a href="http://goo.gl/BYRQKg" target="_blank">http://goo.gl/BYRQKg</a><br>**************************************************************************************************</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 10 Apr 2019 at 11:01, Bo Victor Thomsen <<a href="mailto:bo.victor.thomsen@gmail.com">bo.victor.thomsen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi all -<div><br></div><div>Im am experimenting with using the dataprovider based *spatial* filtering in QGIS</div><div><br></div><div>For example: with a Postgres based datasource I can write a filter like this:</div><div><br></div><div>ST_Intersects( "geometry", ST_GeomFromText(' Polygon ((582084. 6143051.  ...... lots of coordinates ... 582084. 6143051.))', 25832))<br></div><div><br></div><div>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</div><div><br></div><div>Something similar can be done with SQLserver to:   mygeom.ST_Intersects (...) = 1</div><div><br></div><div>But what about ogr file based vector sources like tab or shape files ?</div><div><br></div><div>You can define a *alfanumerical* filter like this : "myfield"  > 27  to a ogr file datasource. Works like a charm.</div><div><br></div><div>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 :-(   </div><div><br></div><div>What am I doing wrong with the file based spatial filtering?  Or is it simply impossible ?</div><div> <br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-5948342608813287632gmail_signature">Med venlig hilsen<div><br></div><div>Bo Victor Thomsen</div><div><br></div></div></div></div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>