iv>
<pre><code><span><span class="co">##    user  system elapsed </span></span>
<span><span class="co">##  0.0389  0.0001  0.0391</span></span></code></pre>
<p>For this smaller data set, the legacy approach without spatial
indexing is adequate, but slows down as the number of observations
increases:</p>
<div class="sourceCode" id="cb57"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/s2.html" class="external-link">sf_use_