gis calculate distance between point and polygon / border
<p>I want to calculate the distance between a point and the border of a country using python / <code>shapely</code>. It should work just fine point.distance(poly) e.g. demonstrated here <a href="http://stackoverflow.com/questions/33311616/find-coordinate-of-closest-point-on-polygon-shapely">Find Coordinate of Closest Point on Polygon Shapely</a> but using <code>geopandas</code> I face the issue of:
<code>'GeoSeries' object has no attribute '_geom'</code></p>

<p>What is wrong in my handling of the data?
My border dataset is from <a href="http://www.gadm.org/" rel="nofollow">http://www.gadm.org/</a></p>

<p><a href="https://i.stack.imgur.com/0VzUi.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/0VzUi.jpg" alt="&#39;GeoSeries&#39; object has no attribute &#39;_geom&#39;"></a></p>

<p>According to <a href="http://geopandas.org/reference.html" rel="nofollow">geopandas</a> documentation, a GeoSeries is a vector of geometries (in your case, <code>0 (POLYGON...</code> tells that you have just one object, but it is still a vector). There should be a way of getting the first geometry element. GeoSeries class implements the <code>__getitem__</code> method, so <code>austriaBorders.geometry[0]</code> should give you the geometry you need. So, try with <code>point.distance(austriaBorders.geometry[0])</code>.</p>

<p>If you only need the distance to a point, the <code>GeoSeries</code> has the <code>distance</code> method implemented, but it will return a vector with the distance to each geometry it contains (according to documentation).   </p>

python gis distance shapely geopandas