3

I am trying to create the largest possible circle inside a polygon including its perimeter and area size. I created via minimum boundary geometry the smallest possible circle outside a polygon (see image) and want to do some calculation with its largest circle inside the polygon. I have a shapefile of 25 polygons. Each has to have its own largest circle. This circle can be anywhere in the polygon, not necesserily at the centre since my polygons are uneven.

enter image description here

I tried looking at Find maximum radius of circle that will fit within an irregular polygon? but it was no success. I have the same problem as the OP.

  • 1
    The answer you mention covers wat you want, what are the problems you are facing with the procedure described? – Gerardo Jimenez Oct 6 '15 at 13:03
  • as the OP mentioned in his question, he tried the answer also, but the circle did not cover the largest area. In his example, the north area has a larger area, so a larger circle is possible in that area. I also want to calculate the largest possible circle, but not from its centroid, but from the best possible location inside the polygon – user30058 Oct 6 '15 at 13:07
  • imgur is blocked here so I can't see the images that go with the answer in the linked question. Hopefully my answer below works. – DMusketeer Oct 6 '15 at 14:54
5

I have worked up an answer in ArcMap and using ET Geowizards (as it is what I have access to but I think the same tools exist in ArcMap but require more than a basic license):

  • Convert polygon to point using 'Deepest Point' option (i.e. maximising distance from the edge of the polygon giving you the most room for the circle.
  • Buffer points using the 'ET_Depth' attribute generated by the previous tool (Initially I spent some time trying to use some sort of 'nearest' tool to calculate the shortest distance between the point and he edge of the polygon but it turns out this is given by the first tool, you may need to do this if you don't want to use ET geowizards).

I haven't fully tested this so, maybe I missed a polygon shape that wouldn't work (conceptually I can't think of one). The bottom left one in the rectangle is interesting because the circle could be anywhere down the polygon and be just as valid. I guess it is at the top because the tool start works systematically top left to bottom right.

Circles

1

Some term this is as girth and the University of Connecticut, Center for Land Use Education & Research, has developed a free geoprocessing tool (Shape Metrics) to calculate this among many other shape metrics. This is mentioned in the link as an index but it is quite easy to find the radius from the formulae given. You can download it from the link, https://clear.uconn.edu/tools/Shape_Metrics/Shape%20Metrics.zip

Two important points (after Hornbydd's comment), the radius derived may not be the exact solution but a good-enough approximation and the tool does not give you the centre of the girth (centroid of circle) or create a circle polygon as output.

  • This is an interesting set of tools, so I downloaded it to have a look but the tool does not actually create a circle as an output. Looking at the source code it just computes a "girth" index. Even if you could back calculate the area of the circle the code offers no mechanism for locating it within the polygon. Whilst this tantalising comes close I don't think it solves the OP request. Interesting set of tools thought. – Hornbydd Aug 14 at 13:55
  • @Hornbydd, fair point, I did not pay attention to "create a polygon" part, just concentrated on radius, area and perimeter arguments. After you, I had a look at the code and I do not think this is the exact max radius of inscribed circle but a result of heuristic approach through a custom densification of the vertices and finding the max length among them. I have updated the answer. – fatih_dur Aug 15 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.