o/s2/reference/s2_closest_feature.html" class="external-link">s2::s2_closest_edges()</a></code> or the legacy brute-force approach,
then only calculating distances from <code>i</code> to <code>j</code>
and copying those to <code>j</code> to <code>i</code> through symmetry.
The distance metric is alway <code>"km"</code>.</p>
<div class="sourceCode" id="cb73"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">max_1nn_ll</span> <span class="op">&lt;-</span> <span class="fu"><a