# What country is the roundest?

**URL:** <https://boards.straightdope.com/t/what-country-is-the-roundest/650836>\
**Category:** Factual Questions\
**Created:** [February 19, 2013, 10:11pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836 "2013-02-19T22:11:54Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [February 20, 2013, 9:31pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/41 "2013-02-20T21:31:53Z")

</div>

> [@MikeS](#):
>
> … calculate the quantity (moment of inertia about center of mass)/(mass \* area) …

Clever idea! Is this equivalent to seeking to minimize, for given area, the mean squared-difference of the country’s points to its center of mass? Or, you could use mean absolute distance.

One way to gather the data, which might not be too hard, at least for largish countries, is to start with a map of a continent in which countries are shown in different colors, and then simply count pixels colored with a given country’s colors. (Obviously a trivial segmentation preprocess would be used since multiple countries will share colors.)

---

<div class="post-metadata">

**Author:** ![Lazlo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lazlo/32/9678_2.png) [@Lazlo](https://boards.straightdope.com/u/Lazlo)\
**Post date:** [February 21, 2013, 3:44am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/42 "2013-02-21T03:44:54Z")

</div>

> [@NoClueBoy](#):
>
> Un-hip, maybe…

Unless you’re Huey Lewis and the News…

---

<div class="post-metadata">

**Author:** ![MikeS](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@MikeS](https://boards.straightdope.com/u/MikeS)\
**Post date:** [February 21, 2013, 4:07pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/43 "2013-02-21T16:07:05Z")

</div>

> [@septimus](#):
>
> Clever idea! Is this equivalent to seeking to minimize, for given area, the mean squared-difference of the country’s points to its center of mass?

I believe this is so, yes.

> [@](#):
>
> Or, you could use mean absolute distance.

I think the advantage to minimizing distance-squared is that there exist [semi-nice formulas](http://mathoverflow.net/questions/73556/calculating-moment-of-inertia-in-2d-planar-polygon) to calculate the moment of inertia of a plane polygon in terms of its vertex positions, but I’m not sure that any such formulas exist for the mean absolute distance. (The formula in the link is derived from Green’s theorem somehow, but to do that you need to have a function with continuous partial derivatives in the region of integration, and the absolute distance function isn’t smooth at the origin.)

Anyhow, I managed to convince Mathematica to do this for me. (Code is below for anybody who’s interested. “fom” stands for “figure of merit.”) Outlying islands & exclaves were treated as being attached to the main part of the country by massless “struts”; as you can see, this penalized archipelago countries pretty heavily. Recall that the theoretical minimum figure of merit is 1/2π = 0.159155…; smaller numbers mean “rounder”.

Top twenty roundest countries (and figure of merit):[ol][li]Sierra Leone (0.163)[_]Zimbabwe (0.168)[_]Suriname (0.169)[_]Poland (0.169)[_]Ivory Coast (0.169)[_]Swaziland (0.169)[_]Nauru (0.171)[_]Uruguay (0.171)[_]Sudan (0.172; This one surprised me for a moment, but it’s actually pretty round now that South Sudan has separated)[_]Egypt (0.172)[_]Romania (0.173)[_]Botswana (0.174)[_]Macedonia (0.174)[_]Vatican City (0.174)[_]Belarus (0.175)[_]Algeria (0.175)[_]Gabon (0.176)[_]Lesotho (0.176)[_]Andorra (0.176)[_]Ethiopia (0.177)[/ol][/li]  
Top ten least round countries:[ol][li]Tuvalu (976.6)[_]Maldives (924.8)[_]Seychelles (872.3)[_]Tonga (57.70)[_]Bahamas (6.35)[_]Cape Verde (4.18)[_]São Tomé and Principe (3.97)[_]Vanuatu (2.98)[_]Comoros (2.28)[_]Solomon Islands (2.26)[/ol][/li]  
Top ten least round countries that are don’t consist of widely separated regions/islands (this is a judgement call on my part on what constitutes “widely”, of course):[ol][li]Chile (2.03; twelfth overall)[_]Norway (0.899)[_]Vietnam (0.894)[_]Gambia (0.793)[_]Japan (0.791)[_]Cuba (0.783)[_]Philippines (0.774)[_]New Zealand (0.688)[_]Israel (0.580)[\*]Panama (0.498)[/ol][/li]  
These results seem reasonable enough to me, so hopefully my brain will now stop bugging me to think about this problem.

```auto

fom[country_] := 
 Module[{cname = country, pointlist, singlelist, basept, area, 
   centeredlist, centroid, moment},
  pointlist = CountryData[cname, "Shape"][[1, 3, 1]];
  basept = First[pointlist][[1]];
  singlelist = pointlist[[1]];
  For[i = 2, i <= Length[pointlist], i++, 
    singlelist = 
     Join[singlelist, {basept}, pointlist[li], {pointlist[[i, 1]]}]][/li] AppendTo[singlelist, basept];
  area = 0;
  For[i = 1, i < Length[singlelist], i++, 
   area = area + 
     1/2 (singlelist[[i, 1]] singlelist[[i + 1, 2]] - 
        singlelist[[i + 1, 1]] singlelist[[i, 2]])];
  If[area < 0, singlelist = Reverse[singlelist]; area = Abs[area]];
  centroid = {0, 0};
  For[i = 1, i < Length[singlelist], i++, 
   centroid = 
    centroid + 
     1/6 {(singlelist[[i, 1]] + 
          singlelist[[i + 1, 
            1]]) (singlelist[[i, 1]] singlelist[[i + 1, 2]] - 
          singlelist[[i + 1, 1]] singlelist[[i, 2]]), (singlelist[[i, 
            2]] + singlelist[[i + 1, 
            2]]) (singlelist[[i, 1]] singlelist[[i + 1, 2]] - 
          singlelist[[i + 1, 1]] singlelist[[i, 2]])}];
  centroid = centroid/area;
  centeredlist = Map[(# - centroid) &, singlelist];
  moment = 0;
  For[i = 1, i < Length[centeredlist], i++,
   moment = 
    moment + 
     1/12 (centeredlist[[i, 1]]^2 + centeredlist[[i, 2]]^2 + 
        centeredlist[[i, 1]] centeredlist[[i + 1, 1]] + 
        centeredlist[[i, 2]] centeredlist[[i + 1, 2]] + 
        centeredlist[[i + 1, 1]]^2 + 
        centeredlist[[i + 1, 
          2]]^2) (centeredlist[[i, 1]] centeredlist[[i + 1, 2]] - 
        centeredlist[[i + 1, 1]] centeredlist[[i, 2]])];
  moment/area^2]

names = CountryData["Countries", "Name"];
roundnesses = Map[fom, names];

SortBy[Transpose[{names, roundnesses}], Last]

```

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [February 21, 2013, 5:05pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/44 "2013-02-21T17:05:25Z")

</div>

> [@MikeS](#):
>
> I believe this is so, yes.I think the advantage to minimizing distance-squared is that there exist [semi-nice formulas](http://mathoverflow.net/questions/73556/calculating-moment-of-inertia-in-2d-planar-polygon) to calculate the moment of inertia of a plane polygon in terms of its vertex positions, …
> 
> Anyhow, I managed to convince Mathematica to do this for me…

You have a contact at Mathematica? How did you convince them? The need to prevent ignorance? I have Wolfram Alpha and can’t wait to ask it for the answer you calculated.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [February 21, 2013, 5:51pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/45 "2013-02-21T17:51:10Z")

</div>

> [@MikeS](#):
>
> To avoid the straight-line problem, you could try the following method instead: treat the country as a flat piece of cardboard with uniform density, and calculate the quantity (moment of inertia about center of mass)/(mass \* area) for this piece of cardboard. This would have a value of 1/2π for a perfect circle, and I _think_ would be larger for any other solid plane shape. Basically, the method would reward “compact” countries like Zimbabwe, while penalizing stretched-out countries like, say, Norway.

A problem with this approach is that a sharp point could be arbitrarily thin, and have little effect. Think of Antarctica, but with a much thinner Antarctic peninsula poking out. Is that considered “round”?

The opposite problem can occur also. A pie with a very thin slice removed would look almost as round as a full pie.

I’d propose finding the minimum radius circle that completely encloses a country, and the maximum radius circle that completely fits within a country, and using their ratio as the criteria. (This would make a shape like a gear rank as pretty round, even though its area to perimeter ratio could be very small. I’d call a many-toothed gear “round”, but I can see how someone could argue that it isn’t round at all.)

---

<div class="post-metadata">

**Author:** ![MikeS](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@MikeS](https://boards.straightdope.com/u/MikeS)\
**Post date:** [February 21, 2013, 7:17pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/46 "2013-02-21T19:17:02Z")

</div>

> [@Leo\_Bloom](#):
>
> You have a contact at Mathematica? How did you convince them? The need to prevent ignorance? I have Wolfram Alpha and can’t wait to ask it for the answer you calculated.

Either I was being unclear or you’re being amusingly pedantic, and I can’t tell which. But to clarify: I have the full version of Mathematica installed on my work computer, and I wrote the program in my previous post in my spare time to answer the question.

---

<div class="post-metadata">

**Author:** ![Svejk\_1](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Svejk\_1](https://boards.straightdope.com/u/Svejk_1)\
**Post date:** [February 21, 2013, 7:54pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/47 "2013-02-21T19:54:20Z")

</div>

That’s pretty neat! Thanks for doing the legwork on that.

---

<div class="post-metadata">

**Author:** ![Wallaby](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wallaby](https://boards.straightdope.com/u/Wallaby)\
**Post date:** [February 21, 2013, 11:46pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/48 "2013-02-21T23:46:36Z")

</div>

There might have been a good answer 3,500 years ago. We studied the Minoans in school, and learnt about the massive volcanic explosion at Thera - San Torini as it’s called today.

Supposedly Thera in Ancient Greek meant ‘round’ - as in the shape of the island - I have my doubts about that. nevertheless, the fragment of the island left is certainly tantalising regarding this topic…

[http://www.amazingcrete.com/maps/map-santorini.htm](http://www.amazingcrete.com/maps/map-santorini.htm)

---

<div class="post-metadata">

**Author:** ![johnpost](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@johnpost](https://boards.straightdope.com/u/johnpost)\
**Post date:** [February 22, 2013, 12:03am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/49 "2013-02-22T00:03:44Z")

</div>

one that Slartibartfast isn’t responsible for.

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [February 22, 2013, 12:20pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/50 "2013-02-22T12:20:35Z")

</div>

> [@Wallaby](#):
>
> There might have been a good answer 3,500 years ago. We studied the Minoans in school, and learnt about the massive volcanic explosion at Thera - San Torini as it’s called today.
> 
> Supposedly Thera in Ancient Greek meant ‘round’ - as in the shape of the island - I have my doubts about that. nevertheless, the fragment of the island left is certainly tantalising regarding this topic…
> 
> [http://www.amazingcrete.com/maps/map-santorini.htm](http://www.amazingcrete.com/maps/map-santorini.htm)

Looks like Kauai’i would if it went kablooey.

---

<div class="post-metadata">

**Author:** ![Renifer](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Renifer](https://boards.straightdope.com/u/Renifer)\
**Post date:** [February 24, 2013, 12:02am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/51 "2013-02-24T00:02:27Z")

</div>

Antarctica is pretty round, except for the pointed peninsula. But then, it probably would not rate as a country.

---

<div class="post-metadata">

**Author:** ![Polycarp](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@Polycarp](https://boards.straightdope.com/u/Polycarp)\
**Post date:** [February 24, 2013, 1:21am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/52 "2013-02-24T01:21:52Z")

</div>

> [@The\_Controvert](#):
>
> Is the least-round country Chile?

It’s no doubt high on the scale, but surpassed for least-roundness by Norway, which has such an unusual shape that its center, figured from its extremes, is in Sweden!

Vietnam has to be well up there on the list as well, as does Croatia.

---

<div class="post-metadata">

**Author:** ![njtt](https://avatars.discourse-cdn.com/v4/letter/n/ecd19e/32.png) [@njtt](https://boards.straightdope.com/u/njtt)\
**Post date:** [February 24, 2013, 3:40am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/53 "2013-02-24T03:40:30Z")

</div>

[quote=“MikeS, post:43, topic:650836”]

I believe this is so, yes.I think the advantage to minimizing distance-squared is that there exist [semi-nice formulas](http://mathoverflow.net/questions/73556/calculating-moment-of-inertia-in-2d-planar-polygon) to calculate the moment of inertia of a plane polygon in terms of its vertex positions, but I’m not sure that any such formulas exist for the mean absolute distance. (The formula in the link is derived from Green’s theorem somehow, but to do that you need to have a function with continuous partial derivatives in the region of integration, and the absolute distance function isn’t smooth at the origin.)

Anyhow, I managed to convince Mathematica to do this for me. (Code is below for anybody who’s interested. “fom” stands for “figure of merit.”) Outlying islands & exclaves were treated as being attached to the main part of the country by massless “struts”; as you can see, this penalized archipelago countries pretty heavily. Recall that the theoretical minimum figure of merit is 1/2π = 0.159155…; smaller numbers mean “rounder”.

Top twenty roundest countries (and figure of merit):[ol][li]Sierra Leone (0.163)[_]Zimbabwe (0.168)[_]Suriname (0.169)[_]Poland (0.169)[_]Ivory Coast (0.169)[_]Swaziland (0.169)[_]Nauru (0.171)[_]Uruguay (0.171)[_]Sudan (0.172; This one surprised me for a moment, but it’s actually pretty round now that South Sudan has separated)[_]Egypt (0.172)[_]Romania (0.173)[_]Botswana (0.174)[_]Macedonia (0.174)[_]Vatican City (0.174)[_]Belarus (0.175)[_]Algeria (0.175)[_]Gabon (0.176)[_]Lesotho (0.176)[_]Andorra (0.176)[\*]Ethiopia (0.177)[/ol][/li][/QUOTE]

Sorry, I am not buying it. Eyeballing these, some are vaguely roundish, but some, such as Sudan, Algeria, Zimbabwe, do not look round at all, maybe closer to square. I think what you have proved is that that the formula you used does not capture what we intuitively mean by roundness very well. Part of “roundness” is having smooth contours, without sharp angles.

---

<div class="post-metadata">

**Author:** ![MikeS](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@MikeS](https://boards.straightdope.com/u/MikeS)\
**Post date:** [February 24, 2013, 4:37pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/54 "2013-02-24T16:37:43Z")

</div>

> [@njtt](#):
>
> Sorry, I am not buying it. Eyeballing these, some are vaguely roundish, but some, such as Sudan, Algeria, Zimbabwe, do not look round at all, maybe closer to square. I think what you have proved is that that the formula you used does not capture what we intuitively mean by roundness very well. Part of “roundness” is having smooth contours, without sharp angles.

I don’t entirely disagree; there are many different criteria we could use for “roundness”. Mine probably tests for “compactness” more than “roundness”; it avoids the “straight-line” problem I mentioned upthread, but it’s not a perfect criterion either. If there are other mathematical criteria that people would like me to apply to the polygon data I extracted from Mathematica, I’d be happy to give it a shot.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [February 24, 2013, 6:24pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/55 "2013-02-24T18:24:46Z")

</div>

> [@MikeS](#):
>
> I don’t entirely disagree; there are many different criteria we could use for “roundness”. Mine probably tests for “compactness” more than “roundness”; it avoids the “straight-line” problem I mentioned upthread, but it’s not a perfect criterion either. If there are other mathematical criteria that people would like me to apply to the polygon data I extracted from Mathematica, I’d be happy to give it a shot.

I didn’t realize Mathematica contained so much data. Wow!

Another criterion (though I don’t have a particular need to see the results, and suppose that it would also fail to be a “perfect” roundness ranker) would be the portion of the country within an optimally-placed circle whose area is that of the country. (It might be more robust to sum this ratio over circles of 0.9, 1.0, 1.1 times the country’s area.)

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [February 24, 2013, 7:29pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/56 "2013-02-24T19:29:10Z")

</div>

Tests on the basis of area vs. border length or versus a “fitting circle” are a natural thing to do, but we have the straight lines / sharp corners problem. Off the top of my head, if you’ve got polygonal data, what would happen if we approached this another way - if the country were perfectly circular, the polygonal data should be a perfect n-gon. Suppose we did a score based on walking around the polygon comparing the deviation of the individual polygon segments from those for the n-gon. I haven’t thought through how I want to define the deviation at this point. It might be interesting to ignore the lengths, and simply base the deviation on the direction of the segment versus the direction of the corresponding segment in the n-gon.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 24, 2013, 11:34pm UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/57 "2013-02-24T23:34:08Z")

</div>

> [@](#):
>
> It might be interesting to ignore the lengths, and simply base the deviation on the direction of the segment versus the direction of the corresponding segment in the n-gon.

That wouldn’t be a good method, since it would give the same score to a square as to an arbitrarily-elongated rectangle. Or, for that matter, an arbitrarily-elongated polygon of any shape. You could get something that rated as being highly circular, while not actually being very close to circular at all.

Another problem with polygonal border data is that they’re likely set for some resolution (i.e., minimum length for the sides), which could penalize smaller countries which only have room for a few sides.

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [February 25, 2013, 1:18am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/58 "2013-02-25T01:18:50Z")

</div>

> [@Chronos](#):
>
> That wouldn’t be a good method, since it would give the same score to a square as to an arbitrarily-elongated rectangle. Or, for that matter, an arbitrarily-elongated polygon of any shape. You could get something that rated as being highly circular, while not actually being very close to circular at all.
> 
> Another problem with polygonal border data is that they’re likely set for some resolution (i.e., minimum length for the sides), which could penalize smaller countries which only have room for a few sides.

Yeah, the score for a rectangle being the same as a square is a point, but note that if you have only four segments for your country border, a square is the approximation you should get for a circle. One presumes that the defining polygon has a large number of short segments, and the regular n-gon segments meet at very obtuse angles. A better measure would use the segment lengths, but I’m wondering if with the data at a fine enough resolution, I could ignore them, and instead, just total up deviations in segment directions. What I really want to pick up is where polygon defines substantially different angles than the regular n-gon.

It would be better to use a regular n-gon of the same border length as the country, come up with an expression for the sum of deviations in the coordinates given an arbitrary translation and rotation of the regular polygon in the plane, minimize that, and take that sum of deviations as your score. I’m not going to think about computing that right now.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 25, 2013, 2:07am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/59 "2013-02-25T02:07:25Z")

</div>

> [@](#):
>
> Yeah, the score for a rectangle being the same as a square is a point, but note that if you have only four segments for your country border, a square is the approximation you should get for a circle.

Oh, sure, I don’t have any problem giving a good score for a square. I just have a problem with giving the same good score to a rectangle that’s an inch on one side and ten miles on the other. Though I suppose you could divide up long sides into shorter “sides” with 180 degree angles between them.

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [February 25, 2013, 2:39am UTC](https://boards.straightdope.com/t/what-country-is-the-roundest/650836/60 "2013-02-25T02:39:39Z")

</div>

> [@Chronos](#):
>
> Oh, sure, I don’t have any problem giving a good score for a square. I just have a problem with giving the same good score to a rectangle that’s an inch on one side and ten miles on the other. Though I suppose you could divide up long sides into shorter “sides” with 180 degree angles between them.

I’m sort of implicitly assuming that that’s what the polygonal data for the country will do, at least in all practicality - in other words you’re just going around the border of the country, digitizing at regular intervals. If that isn’t the case, you would have to massage the data a bit by breaking up overly long segments, which would be fairly easy.

[Previous page](https://boards.straightdope.com/t/what-country-is-the-roundest/650836.md?page=2)

[Next page](https://boards.straightdope.com/t/what-country-is-the-roundest/650836.md?page=4)
