Instantly share code, notes, and snippets.

Embed
What would you like to do?
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
'AQ': ('Antarctica', (-180.0, -90.0, 180.0, -63.2706604895)),
'TF': ('Fr. S. and Antarctic Lands', (68.72, -49.775, 70.56, -48.625)),
'AU': ('Australia', (113.338953078, -43.6345972634, 153.569469029, -10.6681857235)),
'AT': ('Austria', (9.47996951665, 46.4318173285, 16.9796667823, 49.0390742051)),
'AZ': ('Azerbaijan', (44.7939896991, 38.2703775091, 50.3928210793, 41.8606751572)),
'BI': ('Burundi', (29.0249263852, -4.49998341229, 30.752262811, -2.34848683025)),
'BE': ('Belgium', (2.51357303225, 49.5294835476, 6.15665815596, 51.4750237087)),
'BJ': ('Benin', (0.772335646171, 6.14215770103, 3.79711225751, 12.2356358912)),
'BF': ('Burkina Faso', (-5.47056494793, 9.61083486576, 2.17710778159, 15.1161577418)),
'BD': ('Bangladesh', (88.0844222351, 20.670883287, 92.6727209818, 26.4465255803)),
'BG': ('Bulgaria', (22.3805257504, 41.2344859889, 28.5580814959, 44.2349230007)),
'BS': ('Bahamas', (-78.98, 23.71, -77.0, 27.04)),
'BA': ('Bosnia and Herz.', (15.7500260759, 42.65, 19.59976, 45.2337767604)),
'BY': ('Belarus', (23.1994938494, 51.3195034857, 32.6936430193, 56.1691299506)),
'BZ': ('Belize', (-89.2291216703, 15.8869375676, -88.1068129138, 18.4999822047)),
'BO': ('Bolivia', (-69.5904237535, -22.8729187965, -57.4983711412, -9.76198780685)),
'BR': ('Brazil', (-73.9872354804, -33.7683777809, -34.7299934555, 5.24448639569)),
'BN': ('Brunei', (114.204016555, 4.007636827, 115.450710484, 5.44772980389)),
'BT': ('Bhutan', (88.8142484883, 26.7194029811, 92.1037117859, 28.2964385035)),
'BW': ('Botswana', (19.8954577979, -26.8285429827, 29.4321883481, -17.6618156877)),
'CF': ('Central African Rep.', (14.4594071794, 2.2676396753, 27.3742261085, 11.1423951278)),
'CA': ('Canada', (-140.99778, 41.6751050889, -52.6480987209, 83.23324)),
'CH': ('Switzerland', (6.02260949059, 45.7769477403, 10.4427014502, 47.8308275417)),
'CL': ('Chile', (-75.6443953112, -55.61183, -66.95992, -17.5800118954)),
'CN': ('China', (73.6753792663, 18.197700914, 135.026311477, 53.4588044297)),
'CI': ('Ivory Coast', (-8.60288021487, 4.33828847902, -2.56218950033, 10.5240607772)),
'CM': ('Cameroon', (8.48881554529, 1.72767263428, 16.0128524106, 12.8593962671)),
'CD': ('Congo (Kinshasa)', (12.1823368669, -13.2572266578, 31.1741492042, 5.25608775474)),
'CG': ('Congo (Brazzaville)', (11.0937728207, -5.03798674888, 18.4530652198, 3.72819651938)),
'CO': ('Colombia', (-78.9909352282, -4.29818694419, -66.8763258531, 12.4373031682)),
'CR': ('Costa Rica', (-85.94172543, 8.22502798099, -82.5461962552, 11.2171192489)),
'CU': ('Cuba', (-84.9749110583, 19.8554808619, -74.1780248685, 23.1886107447)),
'CY': ('Cyprus', (32.2566671079, 34.5718694118, 34.0048808123, 35.1731247015)),
'CZ': ('Czech Rep.', (12.2401111182, 48.5553052842, 18.8531441586, 51.1172677679)),
'DE': ('Germany', (5.98865807458, 47.3024876979, 15.0169958839, 54.983104153)),
'DJ': ('Djibouti', (41.66176, 10.9268785669, 43.3178524107, 12.6996385767)),
'DK': ('Denmark', (8.08997684086, 54.8000145534, 12.6900061378, 57.730016588)),
'DO': ('Dominican Rep.', (-71.9451120673, 17.598564358, -68.3179432848, 19.8849105901)),
'DZ': ('Algeria', (-8.68439978681, 19.0573642034, 11.9995056495, 37.1183806422)),
'EC': ('Ecuador', (-80.9677654691, -4.95912851321, -75.2337227037, 1.3809237736)),
'EG': ('Egypt', (24.70007, 22.0, 36.86623, 31.58568)),
'ER': ('Eritrea', (36.3231889178, 12.4554157577, 43.0812260272, 17.9983074)),
'ES': ('Spain', (-9.39288367353, 35.946850084, 3.03948408368, 43.7483377142)),
'EE': ('Estonia', (23.3397953631, 57.4745283067, 28.1316992531, 59.6110903998)),
'ET': ('Ethiopia', (32.95418, 3.42206, 47.78942, 14.95943)),
'FI': ('Finland', (20.6455928891, 59.846373196, 31.5160921567, 70.1641930203)),
'FJ': ('Fiji', (-180.0, -18.28799, 180.0, -16.0208822567)),
'FK': ('Falkland Is.', (-61.2, -52.3, -57.75, -51.1)),
'FR': ('France', (-54.5247541978, 2.05338918702, 9.56001631027, 51.1485061713)),
'GA': ('Gabon', (8.79799563969, -3.97882659263, 14.4254557634, 2.32675751384)),
'GB': ('United Kingdom', (-7.57216793459, 49.959999905, 1.68153079591, 58.6350001085)),
'GE': ('Georgia', (39.9550085793, 41.0644446885, 46.6379081561, 43.553104153)),
'GH': ('Ghana', (-3.24437008301, 4.71046214438, 1.0601216976, 11.0983409693)),
'GN': ('Guinea', (-15.1303112452, 7.3090373804, -7.83210038902, 12.5861829696)),
'GM': ('Gambia', (-16.8415246241, 13.1302841252, -13.8449633448, 13.8764918075)),
'GW': ('Guinea Bissau', (-16.6774519516, 11.0404116887, -13.7004760401, 12.6281700708)),
'GQ': ('Eq. Guinea', (9.3056132341, 1.01011953369, 11.285078973, 2.28386607504)),
'GR': ('Greece', (20.1500159034, 34.9199876979, 26.6041955909, 41.8269046087)),
'GL': ('Greenland', (-73.297, 60.03676, -12.20855, 83.64513)),
'GT': ('Guatemala', (-92.2292486234, 13.7353376327, -88.2250227526, 17.8193260767)),
'GY': ('Guyana', (-61.4103029039, 1.26808828369, -56.5393857489, 8.36703481692)),
'HN': ('Honduras', (-89.3533259753, 12.9846857772, -83.147219001, 16.0054057886)),
'HR': ('Croatia', (13.6569755388, 42.47999136, 19.3904757016, 46.5037509222)),
'HT': ('Haiti', (-74.4580336168, 18.0309927434, -71.6248732164, 19.9156839055)),
'HU': ('Hungary', (16.2022982113, 45.7594811061, 22.710531447, 48.6238540716)),
'ID': ('Indonesia', (95.2930261576, -10.3599874813, 141.03385176, 5.47982086834)),
'IN': ('India', (68.1766451354, 7.96553477623, 97.4025614766, 35.4940095078)),
'IE': ('Ireland', (-9.97708574059, 51.6693012559, -6.03298539878, 55.1316222195)),
'IR': ('Iran', (44.1092252948, 25.0782370061, 63.3166317076, 39.7130026312)),
'IQ': ('Iraq', (38.7923405291, 29.0990251735, 48.5679712258, 37.3852635768)),
'IS': ('Iceland', (-24.3261840479, 63.4963829617, -13.609732225, 66.5267923041)),
'IL': ('Israel', (34.2654333839, 29.5013261988, 35.8363969256, 33.2774264593)),
'IT': ('Italy', (6.7499552751, 36.619987291, 18.4802470232, 47.1153931748)),
'JM': ('Jamaica', (-78.3377192858, 17.7011162379, -76.1996585761, 18.5242184514)),
'JO': ('Jordan', (34.9226025734, 29.1974946152, 39.1954683774, 33.3786864284)),
'JP': ('Japan', (129.408463169, 31.0295791692, 145.543137242, 45.5514834662)),
'KZ': ('Kazakhstan', (46.4664457538, 40.6623245306, 87.3599703308, 55.3852501491)),
'KE': ('Kenya', (33.8935689697, -4.67677, 41.8550830926, 5.506)),
'KG': ('Kyrgyzstan', (69.464886916, 39.2794632025, 80.2599902689, 43.2983393418)),
'KH': ('Cambodia', (102.3480994, 10.4865436874, 107.614547968, 14.5705838078)),
'KR': ('S. Korea', (126.117397903, 34.3900458847, 129.468304478, 38.6122429469)),
'KW': ('Kuwait', (46.5687134133, 28.5260627304, 48.4160941913, 30.0590699326)),
'LA': ('Laos', (100.115987583, 13.88109101, 107.564525181, 22.4647531194)),
'LB': ('Lebanon', (35.1260526873, 33.0890400254, 36.6117501157, 34.6449140488)),
'LR': ('Liberia', (-11.4387794662, 4.35575511313, -7.53971513511, 8.54105520267)),
'LY': ('Libya', (9.31941084152, 19.58047, 25.16482, 33.1369957545)),
'LK': ('Sri Lanka', (79.6951668639, 5.96836985923, 81.7879590189, 9.82407766361)),
'LS': ('Lesotho', (26.9992619158, -30.6451058896, 29.3251664568, -28.6475017229)),
'LT': ('Lithuania', (21.0558004086, 53.9057022162, 26.5882792498, 56.3725283881)),
'LU': ('Luxembourg', (5.67405195478, 49.4426671413, 6.24275109216, 50.1280516628)),
'LV': ('Latvia', (21.0558004086, 55.61510692, 28.1767094256, 57.9701569688)),
'MA': ('Morocco', (-17.0204284327, 21.4207341578, -1.12455115397, 35.7599881048)),
'MD': ('Moldova', (26.6193367856, 45.4882831895, 30.0246586443, 48.4671194525)),
'MG': ('Madagascar', (43.2541870461, -25.6014344215, 50.4765368996, -12.0405567359)),
'MX': ('Mexico', (-117.12776, 14.5388286402, -86.811982388, 32.72083)),
'MK': ('Macedonia', (20.46315, 40.8427269557, 22.9523771502, 42.3202595078)),
'ML': ('Mali', (-12.1707502914, 10.0963607854, 4.27020999514, 24.9745740829)),
'MM': ('Myanmar', (92.3032344909, 9.93295990645, 101.180005324, 28.335945136)),
'ME': ('Montenegro', (18.45, 41.87755, 20.3398, 43.52384)),
'MN': ('Mongolia', (87.7512642761, 41.5974095729, 119.772823928, 52.0473660345)),
'MZ': ('Mozambique', (30.1794812355, -26.7421916643, 40.7754752948, -10.3170960425)),
'MR': ('Mauritania', (-17.0634232243, 14.6168342147, -4.92333736817, 27.3957441269)),
'MW': ('Malawi', (32.6881653175, -16.8012997372, 35.7719047381, -9.23059905359)),
'MY': ('Malaysia', (100.085756871, 0.773131415201, 119.181903925, 6.92805288332)),
'NA': ('Namibia', (11.7341988461, -29.045461928, 25.0844433937, -16.9413428687)),
'NC': ('New Caledonia', (164.029605748, -22.3999760881, 167.120011428, -20.1056458473)),
'NE': ('Niger', (0.295646396495, 11.6601671412, 15.9032466977, 23.4716684026)),
'NG': ('Nigeria', (2.69170169436, 4.24059418377, 14.5771777686, 13.8659239771)),
'NI': ('Nicaragua', (-87.6684934151, 10.7268390975, -83.147219001, 15.0162671981)),
'NL': ('Netherlands', (3.31497114423, 50.803721015, 7.09205325687, 53.5104033474)),
'NO': ('Norway', (4.99207807783, 58.0788841824, 31.29341841, 80.6571442736)),
'NP': ('Nepal', (80.0884245137, 26.3978980576, 88.1748043151, 30.4227169866)),
'NZ': ('New Zealand', (166.509144322, -46.641235447, 178.517093541, -34.4506617165)),
'OM': ('Oman', (52.0000098, 16.6510511337, 59.8080603372, 26.3959343531)),
'PK': ('Pakistan', (60.8742484882, 23.6919650335, 77.8374507995, 37.1330309108)),
'PA': ('Panama', (-82.9657830472, 7.2205414901, -77.2425664944, 9.61161001224)),
'PE': ('Peru', (-81.4109425524, -18.3479753557, -68.6650797187, -0.0572054988649)),
'PH': ('Philippines', (117.17427453, 5.58100332277, 126.537423944, 18.5052273625)),
'PG': ('Papua New Guinea', (141.000210403, -10.6524760881, 156.019965448, -2.50000212973)),
'PL': ('Poland', (14.0745211117, 49.0273953314, 24.0299857927, 54.8515359564)),
'PR': ('Puerto Rico', (-67.2424275377, 17.946553453, -65.5910037909, 18.5206011011)),
'KP': ('N. Korea', (124.265624628, 37.669070543, 130.780007359, 42.9853868678)),
'PT': ('Portugal', (-9.52657060387, 36.838268541, -6.3890876937, 42.280468655)),
'PY': ('Paraguay', (-62.6850571357, -27.5484990374, -54.2929595608, -19.3427466773)),
'QA': ('Qatar', (50.7439107603, 24.5563308782, 51.6067004738, 26.1145820175)),
'RO': ('Romania', (20.2201924985, 43.6884447292, 29.62654341, 48.2208812526)),
'RU': ('Russia', (-180.0, 41.151416124, 180.0, 81.2504)),
'RW': ('Rwanda', (29.0249263852, -2.91785776125, 30.8161348813, -1.13465911215)),
'SA': ('Saudi Arabia', (34.6323360532, 16.3478913436, 55.6666593769, 32.161008816)),
'SD': ('Sudan', (21.93681, 8.61972971293, 38.4100899595, 22.0)),
'SS': ('S. Sudan', (23.8869795809, 3.50917, 35.2980071182, 12.2480077571)),
'SN': ('Senegal', (-17.6250426905, 12.332089952, -11.4678991358, 16.5982636581)),
'SB': ('Solomon Is.', (156.491357864, -10.8263672828, 162.398645868, -6.59933847415)),
'SL': ('Sierra Leone', (-13.2465502588, 6.78591685631, -10.2300935531, 10.0469839543)),
'SV': ('El Salvador', (-90.0955545723, 13.1490168319, -87.7235029772, 14.4241327987)),
'SO': ('Somalia', (40.98105, -1.68325, 51.13387, 12.02464)),
'RS': ('Serbia', (18.82982, 42.2452243971, 22.9860185076, 46.1717298447)),
'SR': ('Suriname', (-58.0446943834, 1.81766714112, -53.9580446031, 6.0252914494)),
'SK': ('Slovakia', (16.8799829444, 47.7584288601, 22.5581376482, 49.5715740017)),
'SI': ('Slovenia', (13.6981099789, 45.4523163926, 16.5648083839, 46.8523859727)),
'SE': ('Sweden', (11.0273686052, 55.3617373725, 23.9033785336, 69.1062472602)),
'SZ': ('Swaziland', (30.6766085141, -27.2858794085, 32.0716654803, -25.660190525)),
'SY': ('Syria', (35.7007979673, 32.312937527, 42.3495910988, 37.2298725449)),
'TD': ('Chad', (13.5403935076, 7.42192454674, 23.88689, 23.40972)),
'TG': ('Togo', (-0.0497847151599, 5.92883738853, 1.86524051271, 11.0186817489)),
'TH': ('Thailand', (97.3758964376, 5.69138418215, 105.589038527, 20.4178496363)),
'TJ': ('Tajikistan', (67.4422196796, 36.7381712916, 74.9800024759, 40.9602133245)),
'TM': ('Turkmenistan', (52.5024597512, 35.2706639674, 66.5461503437, 42.7515510117)),
'TL': ('East Timor', (124.968682489, -9.39317310958, 127.335928176, -8.27334482181)),
'TT': ('Trinidad and Tobago', (-61.95, 10.0, -60.895, 10.89)),
'TN': ('Tunisia', (7.52448164229, 30.3075560572, 11.4887874691, 37.3499944118)),
'TR': ('Turkey', (26.0433512713, 35.8215347357, 44.7939896991, 42.1414848903)),
'TW': ('Taiwan', (120.106188593, 21.9705713974, 121.951243931, 25.2954588893)),
'TZ': ('Tanzania', (29.3399975929, -11.7209380022, 40.31659, -0.95)),
'UG': ('Uganda', (29.5794661801, -1.44332244223, 35.03599, 4.24988494736)),
'UA': ('Ukraine', (22.0856083513, 44.3614785833, 40.0807890155, 52.3350745713)),
'UY': ('Uruguay', (-58.4270741441, -34.9526465797, -53.209588996, -30.1096863746)),
'US': ('United States', (-171.791110603, 18.91619, -66.96466, 71.3577635769)),
'UZ': ('Uzbekistan', (55.9289172707, 37.1449940049, 73.055417108, 45.5868043076)),
'VE': ('Venezuela', (-73.3049515449, 0.724452215982, -59.7582848782, 12.1623070337)),
'VN': ('Vietnam', (102.170435826, 8.59975962975, 109.33526981, 23.3520633001)),
'VU': ('Vanuatu', (166.629136998, -16.5978496233, 167.844876744, -14.6264970842)),
'PS': ('West Bank', (34.9274084816, 31.3534353704, 35.5456653175, 32.5325106878)),
'YE': ('Yemen', (42.6048726743, 12.5859504257, 53.1085726255, 19.0000033635)),
'ZA': ('South Africa', (16.3449768409, -34.8191663551, 32.830120477, -22.0913127581)),
'ZM': ('Zambia', (21.887842645, -17.9612289364, 33.4856876971, -8.23825652429)),
'ZW': ('Zimbabwe', (25.2642257016, -22.2716118303, 32.8498608742, -15.5077869605)),
}
@jhnferraris

This comment has been minimized.

jhnferraris commented Sep 7, 2017

Hi Graydon

Just wanna ask if which of the 4 vaues are southern limit, northern limit, western limit and eastern limit?

Thanks!

@jlcsmith

This comment has been minimized.

jlcsmith commented Sep 29, 2017

Looks like W, S, E N to me.

@cglacet

This comment has been minimized.

cglacet commented Apr 5, 2018

Looks like there is a problem with some coordinates.

    'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)), 
    'FR': ('France', (-54.5247541978, 2.05338918702, 9.56001631027, 51.1485061713)),

According to https://boundingbox.klokantech.com/

  • Afghanistan is 60.52,29.38,74.89,38.49 OK
  • France is -5.22,41.33,9.55,51.2 not OK

You have another source here: bounding-boxes.json, not sure it's correct yet.

@j2deme

This comment has been minimized.

j2deme commented Apr 5, 2018

@jhnferraris @jlcsmith I'm pretty sure they refer to the coordinates of the bounding box 🔲 😁

  • X1, Y1 => upper left corner,
  • X2, Y2 => lower right corner
@uprego

This comment has been minimized.

uprego commented Apr 24, 2018

@cglacet 🇫🇷 is a notably sparse country! At traditional cartography, this translates in these...

Lower left most corner:
https://frupic.frubar.net/shots/36760.png
https://frupic.frubar.net/36760

Upper right most corner:
https://frupic.frubar.net/shots/36761.png
https://frupic.frubar.net/36761

As you can see, both coordinates are correct, and use the numbers quoted as seen in your comment.

If you have any more doubts, consider:

French Guiana (pronounced /ɡiːˈɑːnə/ or /ɡiːˈænə/, French: Guyane française; French pronunciation: ​[ɡɥijan fʁɑ̃sɛz]), officially called Guiana (French: Guyane), is an overseas department and region of France, [...]

More at https://en.wikipedia.org/wiki/French_Guiana.

Actually this is very unfair to Nouméa, so consider forking!!!

Happy mapping 😉,

@eruci

This comment has been minimized.

eruci commented May 31, 2018

I crosschecked this list against geocode.xyz and the following are wrong:
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
'BI': ('Burundi', (29.0249263852, -4.49998341229, 30.752262811, -2.34848683025)),
'BD': ('Bangladesh', (88.0844222351, 20.670883287, 92.6727209818, 26.4465255803)),
'BN': ('Brunei', (114.204016555, 4.007636827, 115.450710484, 5.44772980389)),
'BW': ('Botswana', (19.8954577979, -26.8285429827, 29.4321883481, -17.6618156877)),
'CN': ('China', (73.6753792663, 18.197700914, 135.026311477, 53.4588044297)),
'CM': ('Cameroon', (8.48881554529, 1.72767263428, 16.0128524106, 12.8593962671)),
'DJ': ('Djibouti', (41.66176, 10.9268785669, 43.3178524107, 12.6996385767)),
'EG': ('Egypt', (24.70007, 22.0, 36.86623, 31.58568)),
'ER': ('Eritrea', (36.3231889178, 12.4554157577, 43.0812260272, 17.9983074)),
'GA': ('Gabon', (8.79799563969, -3.97882659263, 14.4254557634, 2.32675751384)),
'IR': ('Iran', (44.1092252948, 25.0782370061, 63.3166317076, 39.7130026312)),
'IQ': ('Iraq', (38.7923405291, 29.0990251735, 48.5679712258, 37.3852635768)),
'JO': ('Jordan', (34.9226025734, 29.1974946152, 39.1954683774, 33.3786864284)),
'JP': ('Japan', (129.408463169, 31.0295791692, 145.543137242, 45.5514834662)),
'KZ': ('Kazakhstan', (46.4664457538, 40.6623245306, 87.3599703308, 55.3852501491)),
'KE': ('Kenya', (33.8935689697, -4.67677, 41.8550830926, 5.506)),
'KG': ('Kyrgyzstan', (69.464886916, 39.2794632025, 80.2599902689, 43.2983393418)),
'KH': ('Cambodia', (102.3480994, 10.4865436874, 107.614547968, 14.5705838078)),
'KW': ('Kuwait', (46.5687134133, 28.5260627304, 48.4160941913, 30.0590699326)),
'LA': ('Laos', (100.115987583, 13.88109101, 107.564525181, 22.4647531194)),
'LB': ('Lebanon', (35.1260526873, 33.0890400254, 36.6117501157, 34.6449140488)),
'MG': ('Madagascar', (43.2541870461, -25.6014344215, 50.4765368996, -12.0405567359)),
'MM': ('Myanmar', (92.3032344909, 9.93295990645, 101.180005324, 28.335945136)),
'MN': ('Mongolia', (87.7512642761, 41.5974095729, 119.772823928, 52.0473660345)),
'MZ': ('Mozambique', (30.1794812355, -26.7421916643, 40.7754752948, -10.3170960425)),
'MW': ('Malawi', (32.6881653175, -16.8012997372, 35.7719047381, -9.23059905359)),
'MY': ('Malaysia', (100.085756871, 0.773131415201, 119.181903925, 6.92805288332)),
'NA': ('Namibia', (11.7341988461, -29.045461928, 25.0844433937, -16.9413428687)),
'NG': ('Nigeria', (2.69170169436, 4.24059418377, 14.5771777686, 13.8659239771)),
'NP': ('Nepal', (80.0884245137, 26.3978980576, 88.1748043151, 30.4227169866)),
'OM': ('Oman', (52.0000098, 16.6510511337, 59.8080603372, 26.3959343531)),
'PK': ('Pakistan', (60.8742484882, 23.6919650335, 77.8374507995, 37.1330309108)),
'PH': ('Philippines', (117.17427453, 5.58100332277, 126.537423944, 18.5052273625)),
'QA': ('Qatar', (50.7439107603, 24.5563308782, 51.6067004738, 26.1145820175)),
'RW': ('Rwanda', (29.0249263852, -2.91785776125, 30.8161348813, -1.13465911215)),
'SD': ('Sudan', (21.93681, 8.61972971293, 38.4100899595, 22.0)),
'SZ': ('Swaziland', (30.6766085141, -27.2858794085, 32.0716654803, -25.660190525)),
'SY': ('Syria', (35.7007979673, 32.312937527, 42.3495910988, 37.2298725449)),
'TD': ('Chad', (13.5403935076, 7.42192454674, 23.88689, 23.40972)),
'TH': ('Thailand', (97.3758964376, 5.69138418215, 105.589038527, 20.4178496363)),
'TJ': ('Tajikistan', (67.4422196796, 36.7381712916, 74.9800024759, 40.9602133245)),
'TM': ('Turkmenistan', (52.5024597512, 35.2706639674, 66.5461503437, 42.7515510117)),
'TR': ('Turkey', (26.0433512713, 35.8215347357, 44.7939896991, 42.1414848903)),
'TZ': ('Tanzania', (29.3399975929, -11.7209380022, 40.31659, -0.95)),
'UG': ('Uganda', (29.5794661801, -1.44332244223, 35.03599, 4.24988494736)),
'UZ': ('Uzbekistan', (55.9289172707, 37.1449940049, 73.055417108, 45.5868043076)),
'VN': ('Vietnam', (102.170435826, 8.59975962975, 109.33526981, 23.3520633001)),
'YE': ('Yemen', (42.6048726743, 12.5859504257, 53.1085726255, 19.0000033635)),
'ZM': ('Zambia', (21.887842645, -17.9612289364, 33.4856876971, -8.23825652429)),
'ZW': ('Zimbabwe', (25.2642257016, -22.2716118303, 32.8498608742, -15.5077869605)),

By wrong, I mean the bounding box completely misses the country.

@ststeiger

This comment has been minimized.

ststeiger commented Aug 29, 2018

As you can see, both coordinates are correct, and use the numbers quoted as seen in your comment.

As you can clearly see, the coordinates are NOT correct.
There are 2 possibilities:
a) France denotes France Métropolitaine
b) France denotes all the territories of France

case A) French Guiana is NOT part of France Métropolitaine
case B) You're missing Réunion in the east, and French Polynesia in the west.

https://fr.wikipedia.org/wiki/France_m%C3%A9tropolitaine
And note:
Corsica is also part of France Métropolitaine.

@PatrikHlobil

This comment has been minimized.

PatrikHlobil commented Sep 10, 2018

Below my version of a country bounding box CSV. I used the Novatim Server, passing the country names via:

import json
import requests
r = requests.get(r"http://nominatim.openstreetmap.org/search?q=%s&format=json"%country)
boundingbox = json.loads(r.text)[0]["boundingbox"]

Finally, I corrected some errors by hand. If you find additional mistakes, please let me know that I can update my table ;D

ISO3 Country Name lat_min lat_max lon_min lon_max
ABW Aruba 12.1702998 12.8102998 -70.2809842 -69.6409842
AFG Afghanistan 29.3772 38.4910682 60.5176034 74.889862
AGO Angola -18.038945 -4.3880634 11.4609793 24.0878856
AIA Anguilla 18.0615454 18.7951194 -63.6391992 -62.7125449
ALA Åland Islands 59.4541578 60.87665 19.0832098 21.3456556
ALB Albania 11.081041 11.408791 -72.6598913 -72.4039128
AND Andorra 42.4288238 42.6559357 1.4135781 1.7863837
ANT Netherlands Antilles 12.1544542 12.1547472 -68.940593 -68.9403518
ARE United Arab Emirates 22.6444 26.2822 51.4980 56.3834
ARG Argentina -55.1850761 -21.781168 -73.5600329 -53.6374515
ARM Armenia 4.3951997 4.5895768 -75.7854388 -75.6325211
ASM American Samoa -14.7608358 -10.8449746 -171.2951296 -167.9322899
ATA Antarctica -85.0511287 -60.0 -180.0 180.0
ATF French Southern Territories -50.2187169 -11.3139928 39.4138676 77.8494974
ATG Antigua and Barbuda 16.7573901 17.929 -62.5536517 -61.447857
AUS Australia -55.3228175 -9.0882278 72.2460938 168.2249543
AUT Austria 46.3722761 49.0205305 9.5307487 17.160776
AZE Azerbaijan 38.3929551 41.9502947 44.7633701 51.0090302
BDI Burundi -4.4693155 -2.3096796 29.0007401 30.8498462
BEL Belgium 49.4969821 51.5516667 2.3889137 6.408097
BEN Benin 6.1730586 6.4930586 5.4621058 5.7821058
BFA Burkina Faso 9.4104718 15.084 -5.5132416 2.4089717
BGD Bangladesh 20.3756582 26.6382534 88.0075306 92.6804979
BGR Bulgaria 41.2353929 44.2167064 22.3571459 28.8875409
BHR Bahrain 35.1878012 35.2278012 72.5273968 72.5673968
BHS Bahamas 20.7059846 27.4734551 -80.7001941 -72.4477521
BIH Bosnia and Herzegovina 42.5553114 45.2764135 15.7287433 19.6237311
BLM Saint Barthélemy 17.670931 18.1375569 -63.06639 -62.5844019
BLR Belarus 51.2575982 56.17218 23.1783344 32.7627809
BLZ Belize 15.8857286 18.496001 -89.2262083 -87.3098494
BMU Bermuda 32.0469651 32.5913693 -65.1232222 -64.4109842
BOL Bolivia, Plurinational State of -22.8982742 -9.6689438 -69.6450073 -57.453
BRA Brazil -33.8689056 5.2842873 -73.9830625 -28.6341164
BRB Barbados 12.845 13.535 -59.8562115 -59.2147175
BRN Brunei Darussalam 4.002508 5.1011857 114.0758734 115.3635623
BTN Bhutan 26.702016 28.246987 88.7464724 92.1252321
BVT Bouvet Island -54.654 -54.187 2.9345531 3.7791099
BWA Botswana -26.9059669 -17.778137 19.9986474 29.375304
CAF Central African Republic 25.217277 25.2194356 55.1742999 55.1762608
CAN Canada 41.6765556 83.3362128 -141.00275 -52.3231981
CCK Cocos (Keeling) Islands -12.4055983 -11.6213132 96.612524 97.1357343
CHE Switzerland 45.817995 47.8084648 5.9559113 10.4922941
CHL Chile -56.725 -17.4983998 -109.6795789 -66.0753474
CHN China 25.0671341 25.9161824 -99.4612273 -98.421576
CIV Côte d'Ivoire 4.1621205 10.740197 -8.601725 -2.493031
CMR Cameroon 1.6546659 13.083333 8.3822176 16.1921476
COD Congo, the Democratic Republic of the -4.2726671 -4.2723703 15.2829578 15.283136
COG Congo -5.149089 3.713056 11.0048205 18.643611
COK Cook Islands -22.15807 -8.7168792 -166.0856468 -157.1089329
COL Colombia -4.2316872 16.0571269 -82.1243666 -66.8511907
COM Comoros -12.621 -11.165 43.025305 44.7451922
CPV Cape Verde 14.8031546 17.2053108 -25.3609478 -22.6673416
CRI Costa Rica 5.3329698 11.2195684 -87.2722647 -82.5060208
CUB Cuba 19.6275294 23.4816972 -85.1679702 -73.9190004
CXR Christmas Island -10.5698515 -10.4123553 105.5336422 105.7130159
CYM Cayman Islands 19.0620619 19.9573759 -81.6313748 -79.5110954
CYP Cyprus 27.4823018 42.4823018 25.6451285 40.6451285
CZE Czech Republic 48.5518083 51.0557036 12.0905901 18.859216
DEU Germany 47.2701114 55.099161 5.8663153 15.0419319
DJI Djibouti 10.9149547 12.7923081 41.7713139 43.6579046
DMA Dominica 15.0074207 15.7872222 -61.6869184 -61.0329895
DNK Denmark 54.4516667 57.9524297 7.7153255 15.5530641
DOM Dominican Republic 17.2701708 21.303433 -72.0574706 -68.1101463
DZA Algeria 18.968147 37.2962055 -8.668908 11.997337
ECU Ecuador -5.0159314 1.8835964 -92.2072392 -75.192504
EGY Egypt 22.0 31.8330854 24.6499112 37.1153517
ERI Eritrea 25.2197993 25.2220008 55.1720522 55.1736716
ESH Western Sahara 24.1597324 24.1997324 -13.7867848 -13.7467848
ESP Spain 27.4335426 43.9933088 -18.3936845 4.5918885
EST Estonia 57.5092997 59.9383754 21.3826069 28.2100175
ETH Ethiopia 3.397448 14.8940537 32.9975838 47.9823797
FIN Finland 59.4541578 70.0922939 19.0832098 31.5867071
FJI Fiji -21.9434274 -12.2613866 -180.0 180.0
FLK Falkland Islands (Malvinas) -53.1186766 -50.7973007 -61.7726772 -57.3662367
FRA France 41.2632185 51.268318 -5.4534286 9.8678344
FRO Faroe Islands 61.3915553 62.3942991 -7.6882939 -6.2565525
FSM Micronesia, Federated States of 0.827 10.291 137.2234512 163.2364054
GAB Gabon -4.1012261 2.3182171 8.5002246 14.539444
GBR United Kingdom 25.2223186 25.2241651 55.1579517 55.1606916
GEO Georgia 30.355757 35.0013544 -85.6051201 -80.7514321
GGY Guernsey 49.4155331 49.5090776 -2.6751703 -2.501814
GHA Ghana 4.5392525 11.1748562 -3.260786 1.2732942
GIB Gibraltar 36.100807 36.180807 -5.3941295 -5.3141295
GIN Guinea 38.1240893 38.1640893 -77.4591124 -77.4191124
GLP Guadeloupe 15.8320085 16.5144664 -61.809764 -61.0003663
GMB Gambia 13.061 13.8253137 -17.0288254 -13.797778
GNB Guinea-Bissau 10.6514215 12.6862384 -16.894523 -13.6348777
GNQ Equatorial Guinea -1.6732196 3.989 5.4172943 11.3598628
GRC Greece 34.7006096 41.7488862 19.2477876 29.7296986
GRD Grenada 11.786 12.5966532 -62.0065868 -61.1732143
GRL Greenland 43.0015105 43.0770931 -70.907562 -70.805801
GTM Guatemala 13.6345804 17.8165947 -92.3105242 -88.1755849
GUF French Guiana 2.112222 5.7507111 -54.60278 -51.6346139
GUM Guam 13.182335 13.706179 144.563426 145.009167
GUY Guyana 1.1710017 8.6038842 -61.414905 -56.4689543
HKG Hong Kong 22.1193278 22.4393278 114.0028131 114.3228131
HMD Heard Island and McDonald Islands -53.394741 -52.7030677 72.2460938 74.1988754
HND Honduras 12.9808485 17.619526 -89.3568207 -82.1729621
HRV Croatia 42.1765993 46.555029 13.2104814 19.4470842
HTI Haiti 21.7470269 21.7870269 -78.1147805 -78.0747805
HUN Hungary 45.737128 48.585257 16.1138867 22.8977094
IDN Indonesia -11.2085669 6.2744496 94.7717124 141.0194444
IMN Isle of Man 54.0539576 54.4178705 -4.7946845 -4.3076853
IND India 6.5546079 35.6745457 68.1113787 97.395561
IOT British Indian Ocean Territory -7.6454079 -5.037066 71.036504 72.7020157
IRL Ireland 51.222 55.636 -11.0133788 -5.6582363
IRN Iran, Islamic Republic of 24.8465103 39.7816502 44.0318908 63.3332704
IRQ Iraq 29.0585661 37.380932 38.7936719 48.8412702
ISL Iceland 51.3863696 51.3868275 0.5475318 0.5479162
ISR Israel 29.4533796 33.3356317 34.2674994 35.8950234
ITA Italy 35.2889616 47.0921462 6.6272658 18.7844746
JAM Jamaica 16.5899443 18.7256394 -78.5782366 -75.7541143
JEY Jersey 49.1625179 49.2621288 -2.254512 -2.0104193
JOR Jordan 10.5378127 10.6910595 122.4078085 122.6356296
JPN Japan 20.2145811 45.7112046 122.7141754 154.205541
KAZ Kazakhstan 40.5686476 55.4421701 46.4932179 87.3156316
KEN Kenya -4.8995204 4.62 33.9098987 41.899578
KGZ Kyrgyzstan 39.1728437 43.2667971 69.2649523 80.2295793
KHM Cambodia 9.4752639 14.6904224 102.3338282 107.6276788
KIR Kiribati -7.0516717 7.9483283 -179.1645388 -164.1645388
KNA Saint Kitts and Nevis 16.895 17.6158146 -63.051129 -62.3303519
KOR Korea, Republic of 37.52806 37.52816 126.89575 126.89585
KWT Kuwait -12.0494672 -12.0094672 -72.8801102 -72.8401102
LAO Lao People's Democratic Republic 13.9096752 22.5086717 100.0843247 107.6349989
LBN Lebanon 40.3199193 40.355802 -76.4508668 -76.391965
LBR Liberia 4.1555907 8.5519861 -11.6080764 -7.367323
LBY Libyan Arab Jamahiriya 19.5008138 33.3545898 9.391081 25.3770629
LCA Saint Lucia 13.508 14.2725 -61.2853867 -60.6669363
LIE Liechtenstein 47.0484291 47.270581 9.4716736 9.6357143
LKA Sri Lanka 25.2287738 25.2303051 55.1813071 55.1828523
LSO Lesotho -30.6772773 -28.570615 27.0114632 29.4557099
LTU Lithuania 53.8967893 56.4504213 20.653783 26.8355198
LUX Luxembourg 49.4969821 50.430377 4.9684415 6.0344254
LVA Latvia 55.6746505 58.0855688 20.6715407 28.2414904
MAC Macao 25.2349583 25.2368385 55.1803834 55.1821684
MAF Saint Martin (French part) 17.8963535 18.1902778 -63.3605643 -62.7644063
MAR Morocco 21.3365321 36.0505269 -17.2551456 -0.998429
MCO Monaco 43.7247599 43.7519311 7.4090279 7.4398704
MDA Moldova, Republic of 46.6744934 46.6745934 29.7521496 29.7522496
MDG Madagascar -25.6071002 -11.9519693 43.2202072 50.4862553
MDV Maldives 25.2252959 25.2263769 55.1823199 55.1837469
MEX Mexico 19.2726009 19.5926009 -99.2933416 -98.9733416
MHL Marshall Islands -0.5481258 14.4518742 163.4985095 178.4985095
MKD Macedonia, the former Yugoslav Republic of 40.8536596 42.3735359 20.4529023 23.034051
MLI Mali 10.147811 25.001084 -12.2402835 4.2673828
MLT Malta 35.6029696 36.2852706 13.9324226 14.8267966
MMR Myanmar 9.4399432 28.547835 92.1719423 101.1700796
MNE Montenegro -29.8446455 -29.5743342 -51.662 -51.3498193
MNG Mongolia 41.5800276 52.1496 87.73762 119.931949
MNP Northern Mariana Islands 14.036565 20.616556 144.813338 146.154418
MOZ Mozambique 19.038889 19.078889 -96.274167 -96.234167
MRT Mauritania 25.2143602 25.2163939 55.1665334 55.1690669
MSR Montserrat 16.475 17.0152978 -62.450667 -61.9353818
MTQ Martinique 14.3948596 14.8787029 -61.2290815 -60.8095833
MUS Mauritius -20.725 -10.138 56.3825151 63.7151319
MWI Malawi -17.1296031 -9.3683261 32.6703616 35.9185731
MYS Malaysia -5.1076241 9.8923759 105.3471939 120.3471939
MYT Mayotte -13.0210119 -12.6365902 45.0183298 45.2999917
NAM Namibia -28.96945 -16.9634855 11.5280384 25.2617671
NCL New Caledonia 33.0351363 33.0751363 -92.6876556 -92.6476556
NER Niger 11.693756 23.517178 0.1689653 15.996667
NFK Norfolk Island -29.333 -28.796 167.6873878 168.2249543
NGA Nigeria 4.0690959 13.885645 2.676932 14.678014
NIC Nicaragua 10.7076565 15.0331183 -87.901532 -82.6227023
NIU Niue -19.0840514 -19.0739661 -169.9383436 -169.9129672
NLD Netherlands 11.825 53.7253321 -68.6255319 7.2274985
NOR Norway 57.7590052 71.3848787 4.0875274 31.7614911
NPL Nepal 26.3477581 30.446945 80.0586226 88.2015257
NRU Nauru -0.5541334 -0.5025906 166.9091794 166.9589235
NZL New Zealand -52.8213687 -29.0303303 -179.059153 179.3643594
OMN Oman 25.2268538 25.2291352 55.1759911 55.1773672
PAK Pakistan 23.5393916 37.084107 60.872855 77.1203914
PAN Panama 35.246906 35.286906 -119.0767707 -119.0367707
PCN Pitcairn -25.1306736 -23.8655769 -130.8049862 -124.717534
PER Peru 41.309511 41.38197 -89.164781 -89.105652
PHL Philippines 4.2158064 21.3217806 114.0952145 126.8072562
PLW Palau 42.5481153 42.5844284 2.9351868 2.9840518
PNG Papua New Guinea -13.1816069 1.8183931 136.7489081 151.7489081
POL Poland 49.0020468 55.0336963 14.1229707 24.145783
PRI Puerto Rico 17.9268695 18.5159789 -67.271492 -65.5897525
PRK Korea, Democratic People's Republic of 37.5867855 43.0089642 124.0913902 130.924647
PRT Portugal 29.8288021 42.1543112 -31.5575303 -6.1891593
PRY Paraguay -27.6063935 -19.2876472 -62.6442036 -54.258
PSE Palestinian Territory, Occupied 31.2201289 32.5521479 34.0689732 35.5739235
PYF French Polynesia -28.0990232 -7.6592173 -154.9360599 -134.244799
QAT Qatar 25.2271767 25.2289841 55.1726803 55.1741485
REU Réunion -21.3897308 -20.8717136 55.2164268 55.8366924
ROU Romania 43.618682 48.2653964 20.2619773 30.0454257
RUS Russian Federation 41.1850968 82.0586232 19.6389 180
RWA Rwanda -2.8389804 -1.0474083 28.8617546 30.8990738
SAU Saudi Arabia 14.4840316 14.4846897 121.0177023 121.0265441
SDN Sudan 10.88 10.92 6.48 6.52
SEN Senegal 12.2372838 16.6919712 -17.7862419 -11.3458996
SGP Singapore 1.1304753 1.4504753 103.6920359 104.0120359
SGS South Georgia and the South Sandwich Islands -59.684 -53.3500755 -42.354739 -25.8468303
SHN Saint Helena, Ascension and Tristan da Cunha -16.23 -15.704 -5.9973424 -5.4234153
SJM Svalbard and Jan Mayen 70.6260825 81.028076 -9.6848146 34.6891253
SLB Solomon Islands -13.2424298 -4.81085 155.3190556 170.3964667
SLE Sierra Leone 6.755 9.999973 -13.5003389 -10.271683
SLV El Salvador 12.976046 14.4510488 -90.1790975 -87.6351394
SMR San Marino 43.8937002 43.992093 12.4033246 12.5160665
SOM Somalia -13.200556 -13.160556 15.246667 15.286667
SPM Saint Pierre and Miquelon 46.5507173 47.365 -56.6972961 -55.9033333
SRB Serbia 42.2322435 46.1900524 18.8142875 23.006309
STP Sao Tome and Principe -0.2135137 1.9257601 6.260642 7.6704783
SUR Suriname 1.8312802 6.225 -58.070833 -53.8433358
SVK Slovakia 47.7314286 49.6138162 16.8331891 22.56571
SVN Slovenia 45.4214242 46.8766816 13.3754696 16.5967702
SWE Sweden 55.1331192 69.0599699 10.5930952 24.1776819
SWZ Swaziland 25.2156672 25.217255 55.1807318 55.18286
SYC Seychelles 25.2237725 25.2250726 55.1816849 55.184065
SYR Syrian Arab Republic 27.1401861 42.1401861 31.5494106 46.5494106
TCA Turks and Caicos Islands 20.9553418 22.1630989 -72.6799046 -70.8643591
TCD Chad 7.44107 23.4975 13.47348 24.0
TGO Togo 5.926547 11.1395102 -0.1439746 1.8087605
THA Thailand 5.612851 20.4648337 97.3438072 105.636812
TJK Tajikistan 36.6711153 41.0450935 67.3332775 75.1539563
TKL Tokelau -9.6442499 -8.3328631 -172.7213673 -170.9797586
TKM Turkmenistan 35.129093 42.7975571 52.335076 66.6895177
TLS Timor-Leste -6.3294157 -6.3284839 106.9549541 106.9551755
TON Tonga -24.1034499 -15.3655722 -179.3866055 -173.5295458
TTO Trinidad and Tobago 9.8732106 11.5628372 -62.083056 -60.2895848
TUN Tunisia 30.230236 37.7612052 7.5219807 11.8801133
TUR Turkey 35.8076804 42.297 25.6212891 44.8176638
TUV Tuvalu -10.9939389 -5.4369611 -180.0 180.0
TWN Taiwan, Province of China 50.8832129 50.8833129 6.0296969 6.0297969
TZA Tanzania, United Republic of -6.8127308 -6.812538 39.2895223 39.2897105
UGA Uganda -1.4823179 4.2340766 29.573433 35.000308
UKR Ukraine 44.184598 52.3791473 22.137059 40.2275801
UMI United States Minor Outlying Islands 6.1779744 6.6514388 -162.6816297 -162.1339885
URY Uruguay -35.7824481 -30.0853962 -58.4948438 -53.0755833
USA United States 24.9493 49.5904 -125.0011 -66.9326
UZB Uzbekistan 37.1821164 45.590118 55.9977865 73.1397362
VAT Holy See (Vatican City State) 41.9002044 41.9073912 12.4457442 12.4583653
VCT Saint Vincent and the Grenadines 12.5166548 13.583 -61.6657471 -60.9094146
VEN Venezuela, Bolivarian Republic of 0.647529 15.9158431 -73.3529632 -59.5427079
VGB Virgin Islands, British 17.623468 18.464984 -65.159094 -64.512674
VIR Virgin Islands, U.S. 17.623468 18.464984 -65.159094 -64.512674
VNM Viet Nam 8.1790665 23.393395 102.14441 114.3337595
VUT Vanuatu -20.4627425 -12.8713777 166.3355255 170.449982
WLF Wallis and Futuna -14.5630748 -12.9827961 -178.3873749 -175.9190391
WSM Samoa 40.7987372 40.8387372 -124.2064518 -124.1664518
YEM Yemen 11.9084802 19.0 41.60825 54.7389375
ZAF South Africa -47.1788335 -22.1250301 16.3335213 38.2898954
ZMB Zambia -18.0765945 -8.2712822 21.9993509 33.701111
ZWE Zimbabwe -22.4241096 -15.6097033 25.2373 33.0683413
@PiTiLeZarD

This comment has been minimized.

PiTiLeZarD commented Oct 6, 2018

I'm going through these lists and found few mistakes:

  • Samoa is wrongly positioned on the west coast of USA. I corrected it to: [[-13.334792, -172.934818], [-14.097472, -171.330502]]
  • Bahrain is off too, I have it corrected as: [[26.342619, 50.414458], [25.815088, 50.695428]]

If I find anything else I'll edit this comment.

@tombola

This comment has been minimized.

tombola commented Nov 5, 2018

In the list from PatrikHlobil United Kingdom coordinates seem to be based on the location of the UK islands in 'the world' artificial archepelago in dubai. So sort of technically correct, in an extremely abstract way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment