title: calculate centroid d3
body: <p>Based on a svg <a href="http://en.wikipedia.org/wiki/File%3aWorld_map_-_low_resolution.svg" rel="nofollow">world map from wikipedia</a> i need to calculate the centroid of every country. The d3 library supports a <a href="https://github.com/mbostock/d3/wiki/Geo-Paths#wiki-centroid" rel="nofollow">centorid method for paths</a>. In the provided svg file the path coordinates of every country are included. For example Germany:</p>
  
  <p>How can i you use the attribute "d" of the svg data to calculate the centroid in D3 syntax? I need it to place point in to the centroid of every country.</p>