Hacker News new | ask | show | jobs
by mikeash 3628 days ago
The measure is how much overlap there is with a rectangle of the same area, which means that a narrow but deep deviation is weighted the same as a shallow but long deviation along the border. I'd think that an intuitive notion of "rectangulareness" (rectanglosity? rectangularity?) would better match some sort of RMS measurement, where the penalty for a mismatch is proportional to the square of its distance from the ideal rectangle. It would be really interesting to see what changes with that sort of measurement.

Regarding Nauru, I think that's just poor resolution in the source data. It's only a couple of miles across, and the plot looks like it attempted to approximate the coastline with points roughly 1 mile (maybe 2km?) apart.

3 comments

There's a couple of different scoring rules that would be interesting, I think.

Another one might be: What's the ratio between the area of the country and the smallest rectangle which bounds the country. This would "punish" countries with protuberances more than ones with "in-cuts", which "feels right" to me.

For some reason, your use of "'punish' countries" made me imagine a world where improving this score gets taken seriously by the peoples of the world, leading to countries gradually becoming more rectangular over time, and many terrible wars along the way.
Alternatively, an era of peace and cultural exchange as countries agree to swap territories to become more rectangular, leading to an influx of new immigrants to both countries and greater understanding that this cultural mixing brings.

But yeah, probably bloodshed and war.

This reminds me of Paradox's strategy games, where players routinely complain about "bordergore" and fight wars to make the map look neater...
That's great, never heard of that before. When I search for that term, the first hit is a Reddit thread where the first commenter expresses his desire to "drop-kick" people who do it. Strong emotions! Maybe we can create this world after all.

I wonder how many actual wars in the past have been started because someone didn't like how the border looked on a map. It has to be non-zero.

> I wonder how many actual wars in the past have been started because someone didn't like how the border looked on a map.

Plenty, though it's less about rectangular shapes per se but borders being drawn by former colonial forces with a ruler, splitting ethnic groups and forcing them to live under a new, foreign government. Under colonial rule every unrest was simply stopped by brute force, after "liberation" and division of countries according to some arbitrary border created by drawing a line along a ruler on the map there was no "moderating" force anymore and ethnicities that had ignored/evaded each other for centuries were forcibly mixed and the former colonial force usually decided who was the new government, based on their interest. A great example is Western Sahara:

Spain left and decided "this part goes to Mauritania, this part goes to Morocco". The Sahawri managed to beat the Mauritanian forces and to claim some land, then Morocco "invaded" (in quotes because Moroccans fought the Spanish in the 50s from as far south as Aoussard). Also, officially the border between Morocco and Algeria is closed because of Algerian support for the Sahawri. But in the north of Morocco, in the Rif area, people feel more connected to the Rif than to Morocco and cultural exchange with the Algerian Rif people is much more vibrant than cultural exchange with the south of Morocco.

Well, even the Paradox players (who can get up to some pretty horrifying things when the game incentivizes them suitably) realize that fighting over bordergore is a little bit silly... :)
That measure (call it boxability) is a bit harsh, though. The US shouldn't have to pay that much for Hawaii.
RMS is a good idea. Maybe you would need an additional penalty for deviations near the corners, to prevent rounded countries from out-scoring those with wavy/angled but straight borders?
It's also good to realize that countries do not lie on a plane, and the edges of the rectangles should be great circle arcs.
Yes, I suspect there may be Euclidean geometry underlying all of this.
Does this depend on the map projection used?
No.. what I'm trying to say is that you shouldn't use a map projection, but rather picture countries painted on the surface of a sphere. Then the border of a country is represented using latitude/longitude coordinates, and straight lines are instead arcs of a great circle. The difference should usually be pretty small, but some countries cough China are big enough that it might matter.

If a measure of rectangularity depends on the map projection used, then it probably also depends on how you orient the coordinate system (e.g. where the North pole is), and is therefore not well defined.