The end goal is that for each (original) point with t50_fid as IDs, I
want its neighboring points within the specified radius listed under
t50_fid_2 in a long format. The caveat is that for the very first (ie. the
smallest) radius 402.336, t50_fid_2 should return neighboring points
within that distance. But for subsequent radii, t50_fid_2 should return
neighboring points within them but not within the smaller radius. Thus for
example, for radius 1609.34m, I should get as neighboring points, points
within 1609.34m but not within the smaller buffer/radius 402.336m.
The problem is that if I use my full data set of over 3000 rows (points), I
get the following error:
Error in CPL_geos_op2(op, st_geometry(x), st_geometry(y)) : Evaluation
I understand this is a memory issue as the code I am using creates buffers
around each point and this approach is memory intensive.
A suggestion was made that I could achieve my objective using
st_is_within_distance instead of st_buffer , st_difference and
st_intersect without creating buffers.
How can I achieve my objective (that is, the table in dataout) efficiently
either with the suggested use of st_is_within_distance, or with my code
without running out of memory (RAM) or any other approach?
Thank you for considering my question.
Lom Navanyo Newton