1

I'm trying to create what I think would be called a spatial join in Qgis as follows:

I have two layers of points both with date fields

What I am trying to achieve is to create a count for every point in layer 1 of the number of points in layer 2 within a set radius (say 500 metres) of point 1.

Then I would like this count to be stored as a field in the attribute table for layer 1.

The issue I have is that I need this to occur when the two date fields match up i.e. when the observation in layer 1 has the date field 2005m1 then I only want to count the points in layer 2 when the date field in layer 2 matches up

My dates are stretched over a period of about 10 years so if there was some way to create a loop that automatically went through each subsequent month that would be brilliant.

I think this post references a similar process but doesn't allow for the join to be based on the additional date requirement:

Count points within each buffer QGIS

They mention that it could be achieved without buffering the points in layer 1 and this would probably be preferred but if anybody knows how to do it with buffers I'm equally happy.

Jamie
  • 31
  • 2
  • Depending on the amount of data you have, it would put probably be more efficient to do so without the buffer, if your data is in a spatial DB. – Techie_Gus Mar 07 '17 at 06:44

0 Answers0