1

I have two large polygon data-sets, one highlights the building footprints and one indicating parcel outlines. I want to find all parcels without a building on them. Essentially all parcel A's which do not contain a parcel B. Is the Spatial query, select by location the best way to do this? The files are very large and often crash.

  • Welcome to GIS SE. If you have not done so, please take the tour to learn about our focused Q&A format. Please edit your question to detail what you have tried, and if you are seeing crashes, please include any crash messages. – Andy Oct 12 '18 at 15:39
2

Yes, Select by location is the right tool. (In this example I used Extract by location but they are essentially the same).

To reduce QGIS' burden, we can:

  1. Process data without showing the layers on the map canvas
  2. Perform only one task at one time.

For example:

(1) Consider we want to extract Parcel 103 (no buildings).

enter image description here

(2) Restart QGIS (or just remove all layers) to empty the map area.

(3) Activate Extract by location (under Processing Toolbox | Vector selection tools).

enter image description here

  1. Click on the ... button and select parcel data.
  2. Click on the ... button and select buildings data.
  3. Select disjoint for the Geometric predicate.
  4. Run the too..

(4) We will get new Extracted layer.

enter image description here

I echo ThingumaBob that you may as well consider changing data provider.

  • +1 - I usually use any form of SQL over built in tools and finding non-intersections is a bit of a pain (e.g. using plain ST_Disjoint on two tables results in a cross product etc.); if QGIS handles that elegantly, better use this than my suggestion. – ThingumaBob Oct 12 '18 at 18:39
  • Thanks @ThingumaBob ; SQL looks a swiss-army-knife, great tool when used by PostGIS guru (i mean, you). It is helpful for me (when i use virtual layer), too. Just recently i am having a hard time trying to work on virtual layers. :( – Kazuhito Oct 13 '18 at 10:07
1

I think you could

  • select all features of your polygon layer

  • run an intersection filter via Select by location on selected features

  • choose Removing from current selection

Main point:

If those files (shapefiles?) are large enough to crash QGIS, consider moving to GeoPackage, or PostGIS even.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.