# World Country Borders

Colored polygons of of each country in the world with links to the applicable CIA World Factbook page.  Click on a country see a pop up a balloon with a picture of that country’s flag and a link to the country’s CIA World Factbook page.  You can also enable the locations of all the country capitals.

I created this by “borrowing” elements from previous work done by Valery35 (Country Names), mcshea98 (Country Polygons), and Filipumme (World Capitals) at the Google Earth Community, so most of the credit goes to them.

 Credits

### 10 comments to World Country Borders

• Thanks for kml. But borders are not exactly mapped when seen from GE
like this point 49.280200,-123.118220 (lat,long) is located inside Canada but in your kml file this point doesn’t come inside any border.

• @Kryptic
The borders have been greatly simplified to make it reasonable size file. This is not really intended to be used close up.

• Kevin

I further reduced this data-set down to 17,000 points and you can see it in an online Map Quiz that I wrote that uses the new HTML5 canvas tag. (Doesn’t work in IE). Thanks for all your hard work!

http://www.scale18.com/canvas4.html

Enjoy,
Kevin

• Naso

@Kevin

Hi Kevin,

I was wandering if you could share what tool you used to reduce the number of points. I had a look at your example and the precision you’ve achieved is exactly what i need. My question may sound stupid but I am a newbie with the maps.

Scored no mistakes in Europe and 3 in Asia – those small islands are tricky

Cheers,

Naso.

• Kevin

I wrote a simple c++ program to reduce the points.

First it calculates the outline length for each polygon and if it is really small then it discards the polygon. This helps throw away really small islands like in northern Canada.

Next it reduces the point count by using a really simple formula.

For each polygon, it iterates through the points in the polygon and calculates the triangle area of each set of 3 points in the polygon. It keeps track of the 3 points with the smallest area. If the area is below a certain threshold (which you can tune to generate more of less detail) then it throws away the middle point and if there are still more than 6 points it repeats again, otherwise it has finished reducing that polygon and goes onto the next.

• I get the borders but no pop up flag!!

• Fantastic resource. Beautifully prepared and presented. Any chance of getting it updated? Yugoslavia and East Timor are long overdue, and just recently South Sudan.

• Anonymous