title: How to calculate total area covered by overlapping circles in Java
body: <p>I am developing an android app which involves calculating the total area covered by a set of circles on a map.</p>
  
  <p>Say I have a <code>List</code> of <code>Circle</code>s, each <code>Circle</code> has fields <code>double longitude</code>, <code>double latitude</code>, and <code>double radius</code>. </p>
  
  <pre><code>List&lt;Circles&gt; circles;
  
  class Circle {
      double longitude;
      double latitude;
      double radius;
  }
  </code></pre>
  
  <p>These circles may or may not overlap, they can be a thousand miles away from each other or they can be all piled up on top of each other.</p>
  
  <p>I want to calculate the total combined area of these <code>Circle</code>s (with their overlapping taken into account of course). What would be a good algorithm (or a library function if there exists) to use for this purpose?</p>