1

I have a data set defined as:

 [
  [lat, long, radius],
  [lat, long, radius],
  ... (100-10k)
  [lat, long, radius]
 ]

How can I calculate the area of the reunion of all the circles? The sum would be the total area of all the circles - the intersection (to remove duplicate counts)?

Stefan Rogin
  • 1,499
  • 3
  • 25
  • 41
  • FYI, this is known as the "union". – Sneftel May 16 '16 at 13:53
  • 2
    Possible duplicate of [Combined area of overlapping circles](http://stackoverflow.com/questions/1667310/combined-area-of-overlapping-circles) – HostileFork says dont trust SE May 16 '16 at 14:16
  • @Sneftel corrected, it was translation glitch :) , it's "reunion" in my native language, thought it was incorrect hence the extra explanation – Stefan Rogin May 16 '16 at 14:17
  • 1
    @clickstefan Note that depending on your purposes, rasterizing and counting the pixels may be "good enough". And note also, there is a [GIS stackexchange](http://gis.stackexchange.com/questions/115927/)...as this is a feature you'd hope a vector system would be able to take care of for you, so if you were to frame it in terms of a particular package that would be a good place for it. – HostileFork says dont trust SE May 16 '16 at 14:24
  • thanks to all, I've converted the circles to polygons and used geoPHP lib union as it was "good enough" for my use-case. Also I need the polygon for further intersections, so 2 hits with one stone :) – Stefan Rogin May 17 '16 at 15:14

0 Answers0