In QGIS 3.14 I am using three polygon layers; one representing buildings, the second representing "city boundaries" and the third representing the municipal boundary.
My aim is to show all the buildings which are placed inside the municipal boundary but outside of the "city boundaries", i.e. buildings in "the open land". I am not interested in making any new data, I only want to visually hide/show features.
My idea was to use the geometry generator, but I don't know if there is any other way to do it?
I first tried to just show all the buildings indside the municipal boundary by typing the following code in the geometry generator:
intersection( $geometry, geometry( get_feature( 'name-of-municipal-boundary-layer','gid','1')))
and that did work out fine.
My problem is that I don't know what to do from here.
I also tried to show all the buildings inside one of the "city boundaries" the same way as with the municipal boundary to just see if that was even possible, but that didn't work..
intersection( $geometry, geometry( get_feature('name-of-city-boundary-layer','gid','1'))