I am developing an android app which involves calculating the total area covered by a set of circles on a map.
Say I have a List
of Circle
s, each Circle
has fields double longitude
, double latitude
, and double radius
.
List<Circles> circles;
class Circle {
double longitude;
double latitude;
double radius;
}
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.
I want to calculate the total combined area of these Circle
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?