# Need tool for ArcMap to draw circle touching three points

I need tool for ArcMap 10.2.2 for Desktop to draw circle by (touching) three points.

I don't know where the center of this circle and this three points shoud be on the circle line.

I have such tool in other GIS software and can show on video how it works, if needed?

• Do you need 1) interactive tool 2) python script or 3) toolbox tool? – Mr. Che Jun 15 '18 at 12:35
• Ideally - an interactive tool. but the arctoolbox tool will fit too. – Andriy Marchak Jun 15 '18 at 12:38
• If you do not need circles and happy to accept ellipses then this tool would automate it all. Unfortunately it is for ArcGIS Pro. – Hornbydd Jun 15 '18 at 14:49

The script below works on selected points.

It is best to attach it to menu item, it will start without prompt dialog. Can be easily modified to do all points in once if they have "triangle" attribute assigned. Moreover in this case and no-intersect between triangles result can be achieved without scripting at all (it is not simply bounding geometry, though):

``````import arcpy
import numpy as np

##  GET LAYERS
points="POINTS"
circles="circles"

##  GET SELECTED POINTS
g=arcpy.Geometry()
gList=arcpy.CopyFeatures_management(points,g)
points=[p.firstPoint for p in gList]

##  FIND CENTRE COORDINATES
matrix=[]
for p in points:matrix.append([p.X,p.Y,1])
D=np.linalg.det(matrix)*2
matrix=[]
for p in points:matrix.append([p.X*p.X+p.Y*p.Y,p.Y,1])
xC=np.linalg.det(matrix)/D
matrix=[]
for p in points:matrix.append([p.X*p.X+p.Y*p.Y,p.X,1])
yC=-np.linalg.det(matrix)/D

pC=arcpy.Point(xC,yC)
R=gList[0].distanceTo(pC)

##  DRAW CIRCLE and  APPEND IT TO CIRCLES LAYER
curT=arcpy.da.InsertCursor(circles,"Shape@")
curT.insertRow((arcpy.PointGeometry(pC).buffer(R),))
``````

I don't think that such a tool exists in ArcGIS. You could use other tools to precisely build your circle, but this would take you more time than just touching the three points. It took me one minute, so if I had to do plenty of circle I would certainly rather use a script. anyway, here is the workaround (based on the fact that there is only one circle passing through three points, and that the center of this circle is the intersection of the perpendiculars to the middle point of each segment joining the 3 points.

1) customize your editor toolbar by adding the "distance-distance tool" (drag and drop the distance-distance tool to your editor toolbar)

2) make sure that snapping is activated for your points

3) selection "polygon" in the construction tools

4) select "distance-distance" in the editor toolbar

5) make a polygon construction using the "distance-distance" tool

6) get the 2 intersections of the circles whose radius is the segment between two of your points (see illustration)

7) repeat that trick for another segment (doesn't matter which one)

8) select circle construction tool

9) place the center of the circle at the intersection of the two perpendiculars, and extend it until it snaps one of you points (it should then snap the three points. However, beware that pointing on the intersection of the construction will not use snapping. Therefore, if you need to be exact, it is better to terminate the polygon that you are drawing, then draw a the circle, and finally remove the polygon used for construction)

The figure below illustrates the3 points (triangle), the temporary polygon (in red) and the final circle (in grey). I have highlighted the two perpendiculars in yellow.

• Thanks! I know this method, but... It really takes more time, and I need to draw over 1500 such circles. I can do this in another software. where there is an "circle through three points" tool, but this software is limited in some functionality that is important to me. – Andriy Marchak Jun 15 '18 at 12:14
• I would really like to have such tool for ArcMap. And I ready to pay for such a tool! – Andriy Marchak Jun 15 '18 at 12:17

Try to add a field that groups the points. Each 3 points must have unique group name. Then use Minimum Bounding Geometry tool with parameters as in the picture below.

License note: The Convex hull, Circle, and Envelope options are only available with an ArcGIS Desktop Advanced license.

• @AndriyMarchak How much will you pay me? (just a joke) =)))) – Mr. Che Jun 15 '18 at 12:54
• but I did not joke!;-) But I like your method with "minimum bouiding geometry", thank you!) – Andriy Marchak Jun 15 '18 at 13:56
• as already mentioned to a previously deleted question, the minimum bounding circle is not equivalent to the circle that contains three points (aka the circumscribed circle). So it is a good idea but it will not work in most cases – radouxju Jun 15 '18 at 14:01
• @Mr.Che Your print screen is really puzzling me. Did you use minimum bounding geometry to get those results? This is not the minimum bounding geometry, and I've checked on my side ( ArcGIS 10.4 ): I don't get circle number 2 with this tool. Or maybe there was a bug in version 10.2 that creates smallest circumscribed circles instead of absolute minimum. Could you please tell on which version you are working. – radouxju Jun 17 '18 at 19:48
• @radouxju 10.2.2.3552 – Mr. Che Jun 18 '18 at 4:17