How Round Is a Country?

More Details

Here is one way to measure the roundness of a country: draw the smallest disk enclosing the map of the country, then calculate how much of the disk is filled by the country's map.

Your function should use the "Polygon" property from the "Country" entity type.

These polygons are in the equirectangular projection.

What Your Function Should Do

Write a function called CountryRoundness. The input should be a country entity. Your output should be the area of the country's polygon divided by the area of the smallest disk surrounding the polygon. Work in equirectangular projection.

CountryRoundness[(Entity["Macedonia", Entity["Country","Macedonia"], "Entity[\"Country\", \"Macedonia\"]", "country"])]

More Examples

CountryRoundness[(Entity["United States", Entity["Country","UnitedStates"], "Entity[\"Country\", \"UnitedStates\"]", "country"])]

Here is the result for Uruguay (in equirectangular projection) and polygon inside its smallest enclosing disk:

CountryRoundness[(Entity["Uruguay", Entity["Country","Uruguay"], "Entity[\"Country\", \"Uruguay\"]", "country"])]

Here is Nauru:

CountryRoundness[(Entity["Nauru", Entity["Country","Nauru"], "Entity[\"Country\", \"Nauru\"]", "country"])]

Island chains are usually not round at all. The smallest enclosing disk of the Bahamas is quite large:

CountryRoundness[(Entity["Bahamas", Entity["Country","Bahamas"], "Entity[\"Country\", \"Bahamas\"]", "country"])]

Things You May Find Useful

The polygon for a country entity is returned with a  MouseOver object:

(Entity["Liechtenstein", Entity["Country","Liechtenstein"], "Entity[\"Country\", \"Liechtenstein\"]", "country"])["Polygon"]

This can be transformed to give a polygon of coordinates:

Short[(Entity["Liechtenstein", Entity["Country","Liechtenstein"], "Entity[\"Country\", \"Liechtenstein\"]", "country"])["Polygon"]/.GeoPosition->Identity/.{x_Real,y_}:>{y,x}]

Graphics[%,ImageSize->Small]

CountryRoundness[country:Entity["Country",_]]:=