3

I am attempting to do a Count points in polygon routine for a clean looking 'density' grid. I have around 800,000 points over a large polygon grid.

My workstation has 24 cores and 128gb RAM, and yet the process will often take twelve hours or longer to complete. A look at the processor affinity shows 4 CPUs out of the bunch being hit at any one time for a moment, punctuated by extended periods where nothing appears to happen, and the output filesize does not increase.

My data are in the same SpatiaLite db, with indexes built.

The output does eventually complete, and gives me what I expect. However, are there any tweaks or options I could explore in QGIS to improve this speed or distribute the processing across more CPUs?

  • 1
    Processing lacks parallel processing support so far. If your data is in SpatiaLite already, why not count in the DB? – underdark Jun 8 '17 at 20:44
  • 1
    If you'll start counting in SpatiaLite you must learn to do it right because spatial index is not utilized transparently but you must make a join or subquery. – user30184 Jun 8 '17 at 20:52
  • @underdark, I wouldn't mind doing this, could you point me to a good tutorial or example? Thanks! – auslander Jun 9 '17 at 2:48
  • Thanks @underdark this looks helpful. I'm currently running the sql statement in the DB Manager - it's not responding, but hopefully it'll finish (correctly) faster than the QGIS gui. :) I'll report back when it's done. – auslander Jun 9 '17 at 16:45

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.