# Find maximum radius of circle that will fit within an irregular polygon?

I have a problem which I think could be handled by using the Zonal Geometry tool in the ArcGIS Spatial Analyst toolbox. However I do not have a license for Spatial Analyst, so I am searching for an alternative; possibly using QGIS.

How do I find the maximum radius of a circle that will fit within an irregular polygon?

Note the polygon could be either a convex or concave hull (as shown below) and the solution must address both.

I tried Joseph's solution but unfortunately the result is not what I was looking for.

First, I do have very irregular polygons like this one: If I follow Joseph's description the result looks like this: This is for sure the result following that solution, but it is not the answer of my question.

Important for me is to answer the question how large the radius of a circle can be in maximum so that the circle is still completely inside the polygon, regardless of where the centre of the circle is.

For example, there is much more space in the north of the polygon, so that there can be placed a much larger circle than in the south of the polygon. But how large can this circle be?

• Welcome to GIS:SE! Are you looking for something like Zonal Statistics? Nov 6 '14 at 10:58
• Maybe I am a liitle bit blind but I can not find an already existing answer to my question. The link on the top of this page "how to calculate raster statistics for polygons" for my opinion does not fit to my question. So some more ideas maybe?? Nov 7 '14 at 9:49

If you want to know the minimum radius for a circle inside a polygon as you mentioned (and not using rasters which is what you can probably do with Zonal Statistics) then it will require a few steps:

• Take your polygon layer (shown in a very simple example) and use Vector > Geometry Tools > Polygon centroids. We will use this "center point" output for this later. • Next, use the SAGA function Convert polygons to lines from the Processing Toolbox
• Take the output line layer and use Convert lines to points, again from SAGA (decrease the points distance to generate more points, this can help give you a more accurate result at the end). • Now we can use the Distance to nearest hub function from the Toolbox. Select the layer which you converted from lines to points as a Source Points Layer; and select the Center Point layer as your Destinations Hubs Layer. Once you run this, you should receive an output layer which contains the distances from each perimeter point to the center point:  The minimum distance should be the minimum radius of your circle within that polygon. We can test this by creating a buffer (Vector > Geoprocessing Tools > Buffer) on the center point layer and copying/pasting the minimum distance from the attribute table into the Buffer Distance option: • Very nicely done! Nov 6 '14 at 22:41
• Found this while researching a recent question looking to basically do the same thing. While at first I thought it might solve their problem, in reading through your steps there appears to be a significant flaw where the process will only work for polygons that are convex hulls and not concave hulls. This is demonstrated in the apparent question edit. The centroid of such a shape won't necessarily fall within it, and even if it did you can see that a larger circle will fit at either end than the middle (where min hub distance would be) of the example shape. May 21 '15 at 0:52
• @ChrisW - Thanks buddy for mentioning that and you're right, this post does not answer the question fully. Hopefully there is a method to address both convex and concave hulls or atleast one in the making! May 28 '15 at 9:16
• If you haven't already seen them, it looks like ET Geowizards has a tool just for this and another user wrote a script that will do it. They can be found at the linked question gis.stackexchange.com/questions/147790 May 28 '15 at 20:23
• @ChrisW - Awesome, haven't seen that post so many thanks for mentioning it! May 29 '15 at 10:58

A little bit late, but I was trying to find the same thing, so I found it, now in QGIS 3x, (i don't know if the previous versions can handle it) in the process tool, there's a tool that in spanish is named "polo de inaccesibilidad" inaccessibility pole. Use it to create a layer of points that are placed at the farthest distance inside the polygon. This max distance has been added as an attribute  Then, just use the buffer tool to draw circles using this distance over the points layer and you will get the biggest circle inside a polygon  1. Find centerpoints circles
2. Connect centerpoints
3. Find midpoint between connected circles
4. Construct hyperboles, using centers as focusing points and midpoints as point on hyperbole
5. Find intersectionpoints of hyperboles
6. Connect intersection hyperbole with centerpoint circle
7. Find intersection on perimeter circle.
8. Construct circle. 