I'm very new to QGIS. I have a problem related to the "select by location" tool of QGIS.

I have loaded 10 different layers into my map containing data of waters (rivers, canals etc.). Now, I want to classify my own data, consisting of ID's with latitude/longitude, as "on land" or "on water". I have chosen the intersect function of QGIS to solve this problem. However, my data contains millions of datapoints which causes the process to be very slow. I have checked the "Use only selected features" checkbox, and the plan is to repeat this step for every single layer. The first layer is "creating a new selection", the next layers should be "add to current selection". Now, the problem is that it takes more than 1 hour for the first layer already. Is there a way to speed up the process? Or I am doing something wrong?

  • 1
    Tile your "Godzilla" polygon data by intersecting them with a regular grid. See ArcGIS Blog and GeoNet – Vince Jun 5 '19 at 21:29
  • If the Water area is much smaller than Land, just Intersect with Water. If the return is Null, it is Land. – klewis Jun 5 '19 at 21:41
  • The return will be Null/None if the point is outside the data extent @klewis. Vince has the right idea but if that doesn't speed up enough try using the regular grid you have intersected with your data and populate a field using select by location with values for all land, all water or a mix of water and land, first check against the fishnet and see if there is a mix of land and water and only then progress to testing against the diced polygons. This will speed processing as the fishnet is less complicated polygons and should select much quicker then use full select for points in doubt. – Michael Stimson Jun 5 '19 at 23:41
  • Thank your for your suggestions. The process I mentioned earlier, is already focusing on intersecting only with the water, as suggested by @klewis . This process takes too much time. – JodyB Jun 6 '19 at 9:00
  • 1
    Make sure you have a Spatial Index on all your data. – klewis Jun 6 '19 at 17:10

Your Answer

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

Browse other questions tagged or ask your own question.