title: circle around a geographic point with st_buffer
body: <p>I would like to plot a circle 110 NM (nautical miles) around Dublin airport using <code>sf</code> package.
  (Later on I will intersect via <code>st_intersect</code> that with flight position reports from ADS-B.)</p>
  
  <p>I have defined a new unit for NM as follows:</p>
  
  <pre><code>library(units)
  library(tidyverse)
  library(sf)
  NM &lt;- make_unit("NM")
  install_conversion_constant("NM", "km", 1.852)
  </code></pre>
  
  <p>Then defined Dublin airport coordinates:</p>
  
  <pre><code># DUB/EIDW location, see 
  # https://skyvector.com/airport/EIDW/Dublin-Airport
  # Coordinates:
  #   N53°25.28' / W6°16.20' (Degrees Decimal Minutes (DDM) format)
  #   (-6.27, 53.421333) (lon/lat Decimal Degrees (DD))
  # Elevation: 242.0 feet (MSL)
  dub_lon &lt;- -6.27
  dub_lat &lt;- 53.421333
  dub_elv &lt;- set_units(242.0, ft)
  
  dub &lt;- st_point( x = c(dub_lon, dub_lat, dub_elv), dim = "XYZ")
  dub &lt;- dub %&gt;% st_sfc(crs = 4326)
  </code></pre>
  
  <p>Hence defined the radius of the circle around the airport (in meters):</p>
  
  <pre><code>r110 &lt;- set_units(110, NM) %&gt;% set_units(km)
  </code></pre>
  
  <p>Now when I try <code>st_buffer</code> things are not working:</p>
  
  <pre><code>&gt; r110 &lt;- set_units(110, NM) %&gt;% set_units(km)
  Error: cannot convert km into Â°
  In addition: Warning message:
  In st_buffer.sfc(dub, dist = r110) :
    st_buffer does not correctly buffer longitude/latitude data, dist needs to be in decimal degrees.
  </code></pre>
  
  <p>If I try to pass a numeric value (<code>203.72</code>, these are km) as distance at least I get only a warning:</p>
  
  <pre><code>&gt; dub110 &lt;- st_buffer(dub, dist = 203.72)
  Warning message:
  In st_buffer.sfc(dub, dist = 203.72) :
    st_buffer does not correctly buffer longitude/latitude data, dist needs to be in decimal degrees.
  </code></pre>
  
  <p>But plotting it shows quite a too big circle</p>
  
  <pre><code>library(mapview)
  mapview(dub110)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NCfhl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NCfhl.png" alt="enter image description here"></a></p>
  
  <p>What are the units for <code>dist</code> I should enter in <code>st_buffer</code>?
  I read the documentation but didn't really find out what to do...</p>
  
  <p>Any hints/helps really appreciated!</p>