3

I have a large field of randomly distributed points (100,000 of them to be precise), and I'd like to get values for a variety of raster and polygon coverages for each point. I've been using the QGIS Point Sampling Tool, and it seems to work very nicely for rasters (runs in under a minute) but to take literally hours for many of my polygon coverages.

Can someone explain to me why this is taking so long?

Is there a more efficient open source tool to do this?

3 Answers 3

2

I wonder if you might be able to use the Add polygon attributes to points tool in the Processing toolbox? (much faster than the standard spatial join according to this blogpost: http://anitagraser.com/2013/10/02/add-polygon-attributes-to-points-vs-join-attributes-by-location/)

1
  • 1
    Perfect! Since it took a little digging for me to realize this, the Plugin that is needed is Sextante, and SAGA must be installed. Commented Oct 3, 2013 at 20:13
0

For polygons, instead of the Point Sampling tool, you could try doing a spatial join, which may be quicker (depending on the implementation of the Point Sampling tool - which works well for rasters, but I don't use it on vectors myself).

1
  • It looks like spatial join is similarly slow. Neuhausr's comment has solved my problem, though! Commented Oct 3, 2013 at 20:16
0

I can confirm that in QGIS 3.38 I had the same problem with a shapefile with 180,000 points. Like spatial join, the Point Sampling Tool also hung and did not finish for hours (MacOS 15.0, 16 GB RAM).

Neuhauser was right about the solution: the SAGA tool Add polygon attributes to points (in the Processing Toolbox). It worked well and fairly quickly (1–2 minutes), as neuhauser suggested in 2013 based on underdark's website.

To add all attributes, I put "all" in the attributes field, since the tool wouldn't let me leave it blank, as the docs suggest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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