Skip to main content
edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Get Getting intersection of circles using shapely?

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I have a List of Points which I transform to circles. Code from herehere

circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]

I want to know which circles within this List intersect each other. Is there a way to achieve that with a native shapely function, or do I have to iterate over the all possible combinations?

I have a List of Points which I transform to circles. Code from here

circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]

I want to know which circles within this List intersect each other. Is there a way to achieve that with a native shapely function, or do I have to iterate over the all possible combinations?

I have a List of Points which I transform to circles. Code from here

circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]

I want to know which circles within this List intersect each other. Is there a way to achieve that with a native shapely function, or do I have to iterate over the all possible combinations?

deleted 1184 characters in body
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61

I have a List of Points which I transform to circles. Code from here

circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]

I want to know which circles within this List intersect each other. Is there a way to achieve that with a native shapely function, or do I have to iterate over the all possible combinations?

*edit: To be more precise: My points look like so: enter image description here

The buffer I create around each point look like this: enter image description here

Note: I do not know why they are not indicated as seperated circles (meaning, why the black lines don't "overlap" the inner part of the circle). The visualization is done in QGis here. When I check in Python each buffer is its own polygon!

Then I want to know which of the buffers intersect and merge all the intersecting buffer to one polygon. I only want to merge the intersecting buffer to one polygon, meaning, creating a polygon for each intersecting buffer which would give me in the end x different polygons. enter image description here Thats where the trouble start. As you can see, all the buffers are intersecting each other. However, I do not get one polygon with the shape of the buffer, but five different polygons!

I could again check which ones intersect, but that seems wrong. The intersection should work the first time...

I have a List of Points which I transform to circles. Code from here

circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]

I want to know which circles within this List intersect each other. Is there a way to achieve that with a native shapely function, or do I have to iterate over the all possible combinations?

*edit: To be more precise: My points look like so: enter image description here

The buffer I create around each point look like this: enter image description here

Note: I do not know why they are not indicated as seperated circles (meaning, why the black lines don't "overlap" the inner part of the circle). The visualization is done in QGis here. When I check in Python each buffer is its own polygon!

Then I want to know which of the buffers intersect and merge all the intersecting buffer to one polygon. I only want to merge the intersecting buffer to one polygon, meaning, creating a polygon for each intersecting buffer which would give me in the end x different polygons. enter image description here Thats where the trouble start. As you can see, all the buffers are intersecting each other. However, I do not get one polygon with the shape of the buffer, but five different polygons!

I could again check which ones intersect, but that seems wrong. The intersection should work the first time...

I have a List of Points which I transform to circles. Code from here

circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]

I want to know which circles within this List intersect each other. Is there a way to achieve that with a native shapely function, or do I have to iterate over the all possible combinations?

added 616 characters in body
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading
edited body
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading
added 295 characters in body
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading
edited title
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading
added 137 characters in body
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading
deleted 18 characters in body
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading
Source Link
four-eyes
  • 3.4k
  • 5
  • 34
  • 61
Loading