I'd like to add a layer in QGIS, not just filtered by attribute, but using a spatial relationship.

For example, visualize only river features that are within the state of São Paulo, Brazil.

How can I do this in QGIS without having to create a new shapefile and cut that data to the state?

closed as unclear what you're asking by Mapperz Nov 22 '16 at 17:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Perhaps this post might help: Rendering based on layer overlap qgis? – Joseph Nov 22 '16 at 15:45
  • 1
    You can use a ruled-based style and as a rule use the following: within( $geometry, geometry( get_feature( 'State_Layer_name','State_name_attribute','Sao Paulo'))) – Victor Nov 22 '16 at 17:54