
What is the roundest country? - gciruelos
http://gciruelos.com/what-is-the-roundest-country.html
======
leni536
> We cannot use those (xi,yi)(xi,yi) directly, because they come from a
> Mercator projection of the earth, thus they are distorted. I had to apply a
> transformation to them in order to get coordinates that aren’t distorted. In
> order to do that I used the pyproj library.

Nitpick: you apply a transformation where they are _less_ distorted. There is
no "distorsionless" mapping from R^2->sphere. A more accurate approach would
be to use spherical geometry to calculate the actual areas, but I doubt that
it would change the values too much though.

Also I would be curious what was the exact projection you used and how you
choose the parameters for each country.

~~~
gciruelos
What I do is the following: For each country, I transform its points from the
equirectangular projection I'm given to an azimutal projection centered in
some point (that depends on the country).

That point is obtained by computing the midpoint of two random points from the
border of the country.

I know it is not the best (if the country is not convex, then the midpoint
isn't necessarily inside it), but it works. The code is at the end of the
post, if you want to take a look at it.

Thanks for pointing that out though, I'm going to add this to the post.

Edit: you were right, it wasn't even the Mercator projection, it was the
equirectangular projection. Thank you!

------
derefr
Neither this, nor the post it's inspired by, is as interesting to me as a
question with a much simpler-to-calculate answer: what's the _smoothest_ (i.e.
lowest fractal-dimension, smallest surface-area-to-volume ratio) country?

At the top would be some country with artificially-defined borders that have
not since been reshaped by war or treaty. At the bottom would likely be the
most "historied" country.

(Then again, at the bottom might just be Canada or Russia, since they have so
much jagged coast to count. Perhaps, for the parts of a country that abut
international waters instead of another country, we could use the political
boundaries of the country's _coastal waters_ surrounding that coast, rather
than the boundaries of its landmass.)

~~~
f_allwein
Would be interesting as even natural borders are very different. I remeber
South Africa (very straight coastline) vs Ireland (very fractal coastline)
being used as an example for complexity in nature.

~~~
kijin
Coastlines vary even within the same country. See South Korea (rank 51). Very
smooth in the east, crazy fractals in the southwest.

------
cpitman
For some reason Egypt has shown up as the most rectangular and now one of the
most round countries. Goes back to how the average person's definition of
these terms isn't capture by the metric. When I say a country is "rectangular"
I'm thinking about straight lines and sharp corners. "Round" I guess should be
the absence of corners?

~~~
gciruelos
There's nothing wrong with that. A square is very "round" in the sense that it
is very close to a circle in terms of shape, compared to all other possible
polygons out there.

~~~
emptybits
> A square is very "round" in the sense that it is very close to a circle in
> terms of shape, compared to all other possible polygons out there.

Regular convex n-gons approach a circle in terms of shape as n increases. A
square represents n=4. For any n>4, the polygon will be closer to a circle in
terms of shape than a square, no?

ADDED: Right. Thank you for pulling my head out of abstract, regular
convexness. IRL FTW. :-)

~~~
sirclueless
Yes, but you are only looking at regular N-gons, while the person you are
responding to is considering all polygons.

Square countries are relatively close to being circular compared to the many
highly irregular countries out there, not compared to other regular N-gons.

------
Stratoscope
Watch out for over-generalization, especially when the thing you're
generalizing is a geographic shape.

(In GIS, "generalization" is what you might also call "simplification" \-
reducing the vertex count of the borders so you have less data to deal with.)

Take Scarborough Reef (aka Scarborough Shoal) for example: #6 on the list with
a Roundness of 0.9. It only has four vertices, a simple squarish
quadrilateral. Is that what it is really shaped like? You be the judge:

[https://commons.wikimedia.org/wiki/File:Scarborough_Shoal_La...](https://commons.wikimedia.org/wiki/File:Scarborough_Shoal_Landsat.jpg)

~~~
gciruelos
Yes, I know, that is a pity. I didn't simplify anything though, I use all the
vertices that the dataset gives me, the dataset is the problem here.

------
wingerlang
I wonder if they will get the same result if they plot the countries as shapes
in a physics engine and roll them down the hill.

~~~
prawn
There's a half-baked mobile game idea in that!

------
flexie
I don't recognize France on spot 156. As for United States on spot 121,
Netherlands on spot 93, Denmark on spot 97 etc. it looks like they have
included all overseas territories. But it does look weird.

~~~
seszett
France seems to be centered on Siberia or something.

You can see Polynesia at bottom right, Southern and Antarctic Lands at bottom
left, mainland at center left, and the territories in the Americas at the top.

------
peterburkimsher
So, Egypt is both round (20) and rectangular (1)?

Compare:
[http://pappubahry.com/misc/rectangles/](http://pappubahry.com/misc/rectangles/)

~~~
sirclueless
There's actually a lot of overlap. See Nauru (2, 10), Sierra Leone (1, 14),
Uruguay (9, 13) etc.

It's interesting, I think both of these metrics reward largely the same thing,
independent of actual approximate shape, which is a lack of irregularity in
their borders and many degrees of symmetry.

------
jnevill
What happened to France?

~~~
cperciva
The borders of France, and other colonial powers, are considered to include
all of their overseas territories. This is a bit easier to see with the USA.

In practice I don't think this affects the computation much, since the
overseas territories have relatively small areas.

~~~
glandium
I don't think "Metropolitan" France would be 156th.

------
andrepd
LaTeX nitpick: use \text for function names, like \text{roundness}, or else
you have _roundness_ which means _r_ times _o_ times _u_...

------
zwieback
Nice writeup but it seems like there should be a closed analytical solution
vs. an iterative one.

------
zydeco
It seems a bit counter-intuitive that Vatican is 4th roundest, and 2nd
rectangularest

~~~
thaumasiotes
You can fully specify any rectangle by its length and width (and the fact that
it's a rectangle...). They're all very round compared to arbitrary shapes.

------
skeltoac
Nauru is the 2nd roundest (0.923) and the 10th most rectangular (0.917).
[http://pappubahry.com/misc/rectangles/](http://pappubahry.com/misc/rectangles/)

------
smb06
Swaziland is a good candidate for the "roundest country". Macedonia and Qatar
wouldn't be too far behind either.

~~~
f_allwein
11, 21 and 103 respectively, according to this (table in the middle).

~~~
smb06
Hadn't see the table before my reply. I was just thinking about the countries
from the ones that i remembered. Thanks for pointing me to it!

~~~
f_allwein
Weird, I missed it too when I first read the article, even though it is bang
in the middle. They should have mentioned it in the text maybe.

------
sshasan
I had no idea what or where Serranilla Bank (#70) was. Something new to learn
everyday. :)

------
hathym
Why do France looks like little dots???

~~~
snaily
Overseas dependencies.

------
jm173
Nauru is the 2nd roundest I know.

------
thegauravkumar
I dont know.

