title: Finding Overlapping Buffers in R
body: <p>I have coordinates which I added a 75m buffer around. I want to filter the buffers by year and then determine if any buffers from observations within the same year are overlapping. I want to be able to identify which buffers are overlapping to either omit them if they are repeated observations or merge them if they are touching.</p>
  <pre><code>e_af_df &lt;- na.omit(e_af_simp_21)
  e_af_obs &lt;- st_as_sf(e_af_df, coords=c(7, 6), crs = st_crs(4326))
  e_af_t &lt;- st_transform(e_af_obs, 5070)
  e_buffers = st_buffer(e_af_t, dist=75)
  e_buffers$Year &lt;- format(as.Date(e_buffers$Date, format=&quot;%m/%d/%Y&quot;), &quot;%Y&quot;)
  b.2016 &lt;- subset(e_buffers, e_buffers$Year == &quot;2016&quot;)
  </code></pre>
  <p>So far this works to draw my buffer (sf polygons) and filter by year, using 2016 as an example here. I then try to find the overlapping buffers using st_intersection.</p>
  <pre><code>o.2016 = st_intersection(b.2016)
  summary(o.2016)
  </code></pre>
  <p>This tells me that 1718 buffers are overlapping, which I find unlikely since there is only a total of 2768 for that year. I think there might be a double-counting of buffer IDs. Regardless, I am unable to see which buffers are intersecting with each other, just that intersections are occurring.</p>
  <p>For some other years, doing the same thing results in an error.</p>
  <blockquote>
  <p>Error in CPL_nary_intersection(x) : GEOS exception</p>
  </blockquote>
  <p>I read that changing the precision may fix this so I used st_set_precision. Yet this only fixed the error for certain years as well.</p>
  <p>Does anyone know of a simple way to find overlapping buffers or a way to fix this code?</p>