title: Extracting the city boundary coordinates from an OpenStreetMap dataframe
body: <p>I have the OpenStreetMap data for a country stored in a dataframe <code>df</code>. How can I get the coordinates (which together form a polygon in OSM terminology) of specific cities?</p>
  <p>A previous answer on how to access a city give me this code:</p>
  <pre><code>df.filter(df(&quot;tags&quot;).getItem(&quot;name&quot;)===&quot;Baarle-Nassau&quot;).show()
  </code></pre>
  <p>I have tried to access specifically get the boundary by using</p>
  <pre><code>df.filter(df(&quot;tags&quot;).getItem(&quot;name&quot;)===&quot;Baarle-Nassau&quot; &amp;&amp; df(&quot;tags&quot;).getItem(&quot;type&quot;)===&quot;boundary&quot;).show()
  </code></pre>
  <p>But this does not yield what I expect: an array of coordinates.</p>