Hi all, What about using the geometric centre of the MBR as its centre, and then using a radius of half the diagonal across the MBR?
It is actually made easy by the create ellipse command, which only requires the min and max coordinates. You could use it in a mapbasic program as follows: Copy the table into another table and in the main routine have the line Update CopyTableName Set Obj = fCreateSmallestCircle(Obj) Function fCreateSmallestCircle( ByVal curObj As Object) As Object Dim SmallestCircle Create Ellipse Into Variable SmallestCircle (ObjectGeography(curObj,OBJ_GEO_MINX), ObjectGeography(curObj,OBJ_GEO_MINY) (ObjectGeography(curObj,OBJ_GEO_MAXX), ObjectGeography(curObj,OBJ_GEO_MAXY)) End Function ------------------------------------------- Robert Crossley Agtrix P/L Australia Far Southern Queensland Office: 9 Short Street PO Box 63 New Brighton 2483 P: 61 2 6680 1309 F: 61 2 6680 5214 E: [EMAIL PROTECTED] W: www.agtrix.com Brisbane Office: 109 Milsom St Cooparoo 4151 Queensland P: 61 7 3843 3363 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Victor Minor Sent: 30 March 2006 00:55 To: MAPINFO-L Subject: re[2]: [MI-L] smallest circle around polygon Yep. Bad answer. I should have stepped up to the white board first. If you use the diagonal from the MBR, you will get a circle that encloses the entire polygon. BUT, it is not the smallest circle (although in the case of the long stripe it is.) There seems to be a pretty good article that describes one algorithm for doing this: Skyum, "A simple algorithm for computing the smallest enclosing circle", Information Processing Letters 3(1991) 121-125. It is definetly not a trivial problem though. Victor Minor >> Well, the math for the solution is way outside my tiny brain, but this >> simple example will show that the suggested MBR method is incorrect. >> Imagine we have a polygon which is a thin stripe 1.41 mile in length at a >> diagonal orientation. The length of the sides of the MBR are then 1 mile >> each. Obviously, a 1 mile diameter circle will not enclose a 1.41 mile >> long >> polygon. >> Uffe is correct that the problem is more complex. >> Steve Wallace >> _______________________________________________ >> MapInfo-L mailing list >> MapInfo-L@lists.directionsmag.com >> http://www.directionsmag.com/mailman/listinfo/mapinfo-l _______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l _______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l