3 Copyright (C) 2007-2010 Mario Rodriguez Riotorto
5 This program is free software; you can redistribute
6 it and/or modify it under the terms of the
7 GNU General Public License as published by
8 the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it
12 will be useful, but WITHOUT ANY WARRANTY;
13 without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details at
16 http://www.gnu.org/copyleft/gpl.html
21 This is the cartography subpackage of package draw.
24 * Some boundaries and islands are controversial. I tried to
25 define countries according to the borders recognized by
26 the United Nations. Please, don't feel offended due to
27 my mistakes and/or ignorance.
28 * The WBD doesn't contain borders for Eritrea.
29 * I have assigned the antarctic islands to the Antarctica
31 * The WBD doesn't separate european and asian Russia,
32 that's why I haven't included Russia as an european
34 * The WDB contains some lakes not yet included here.
35 * When drawing countries as coloured polygons, don't forget
36 that some countries are completely surrounded by other
37 countries: San_Marino by Italy and Lesotho by South_Africa.
40 For questions, suggestions, bugs and the like, feel free
43 mario AT edu DOT xunta DOT es
46 ?defvar(worldmap_version, 1) $
54 Returns a list of pairs, taken elements from a flatten
55 list with an even number of components.
58 if not listp(x) or not evenp(length(x))
59 then error("Argument must be a list with an even number of components")
60 else makelist([x[2*i-1],x[2*i]], i,1,length(x)/2) $
66 Draws a list of polygonal segments (boundaries), labeled by
67 its numbers (boundaries_array coordinates). This is of great
68 help when building new geographical entities.
70 [1] numbered_boundaries(makelist(i,i,0,200))$
71 draws the first 201 boundaries of variable boundaries_array.
73 numbered_boundaries(lista):=
74 block([pares,ar,n,coord,s,labs:[]],
76 ar: boundaries_array[k],
77 n: (arrayinfo(ar)[3][1] - 1)/2,
80 s: s + [ar[2*i],ar[2*i+1]],
82 labs: cons([string(k),s[1],s[2]],labs) ),
84 append([geomap(lista)],
86 apply(label,labs)])) )$
91 Detects polygonal segments containing at least one vertex in the rectangle
92 with vertices (x1,y1) -upper left- and (x2,y2) -bottom right-.
94 region_boundaries_plus(x1,y1,x2,y2):=
95 block([n, lista:[], ncoord, x, y, isok],
96 n:arrayinfo(boundaries_array)[3][1],
98 ncoord: ?array\-dimension(boundaries_array[i],0)/2,
99 xmin:1.75555970201398d+305,
100 xmax:-1.75555970201398d+305,
101 ymin:1.75555970201398d+305,
102 ymax:-1.75555970201398d+305,
104 for j:1 thru ncoord while not isok do(
105 x: boundaries_array[i][2*j-2],
106 y: boundaries_array[i][2*j-1],
107 if x > x1 and x < x2 and y > y2 and y < y1
110 then lista: endcons(i,lista) ),
116 Detects polygonal segments fully contained in the rectangle with vertices
117 (x1,y1) -upper left- and (x2,y2) -bottom right-.
119 [1] region_boundaries(-31.81,74.92,49.84,32.06);
120 returns segment numbers for plotting the european region.
121 [2] numbered_boundaries(region_boundaries(10.4,41.5,20.7,35.4))$
122 plots boundary lines, together with their numbers, in rectangle
123 from 10.4E 41.5N to 20.7E 35.4N, south Italy.
125 region_boundaries(x1,y1,x2,y2):=
126 block([n, lista:[], ncoord, x, y, xmin, xmax, ymin, ymax, isok],
127 n:arrayinfo(boundaries_array)[3][1],
129 ncoord: ?array\-dimension(boundaries_array[i],0)/2,
130 xmin:1.75555970201398d+305,
131 xmax:-1.75555970201398d+305,
132 ymin:1.75555970201398d+305,
133 ymax:-1.75555970201398d+305,
135 for j:1 thru ncoord while isok do(
136 x: boundaries_array[i][2*j-2],
137 y: boundaries_array[i][2*j-1],
138 if x > x1 and x < x2 and y > y2 and y < y1
139 then (if x < xmin then xmin: x,
140 if x > xmax then xmax: x,
141 if y < ymin then ymin: y,
142 if y > ymax then ymax: y)
145 x1 <= xmin and xmax <= x2 and
146 y2 <= ymin and ymax <= y1
147 then lista: endcons(i,lista) ),
154 Makes polygonal objects from boundary indices.
156 [1] make_polygon([56,65,33]);
157 Appends arrays of coordinates boundaries_array[56],
158 boundaries_array[65] and boundaries_array[33] and
159 returns a polygon object suited to be plotted by
160 draw2d. To avoid an error message, arrays must be
161 compatible, in the sense that any two consecutive
162 arrays have two coordinates in the extremes in common.
164 boundaries_array[56] = #(1 2 3 4 5 6 7 8)
165 boundaries_array[65] = #(7 8 9 2 3 4)
166 boundaries_array[33] = #(9 9 6 2 3 5 6 7 3 4)
168 polygon([[1,2],[3,4],[5,6],[7,8],
170 [3,4],[6,7],[3,5],[6,2],[9,9]])
171 see how the pairs of boundaries_array[33] have been
175 block([pols:[],pairs],
177 not every(lambda([z],integerp(z) and z>=0 and z<=arrayinfo(boundaries_array)[3][1]),
179 then error("Argument is not a list of valid integers"),
181 pairs: list_to_pairs(listarray(boundaries_array[bnd])),
182 if length(pols)=0 or last(pols)=first(pairs)
183 then pols: append(pols,pairs)
184 elseif last(pols)=last(pairs)
185 then pols: append(pols,reverse(pairs))
186 elseif bnd=second(lis) and first(pols)=first(pairs)
187 then pols: append(reverse(pols),pairs)
188 elseif bnd=second(lis) and first(pols)=last(pairs)
189 then pols: append(reverse(pols),reverse(pairs))
190 else error("It's not possible to create the polygon:",bnd)),
191 funmake('polygon,[pols]))$
197 Makes the necessary polygons to draw a coloured country.
198 If islands exist, one country can be defined with more than
201 [1] apply(draw2d,make_poly_country(Canada))$
202 Draws Canada. make_poly_country returns a list of
203 polygons, that's why we use apply.
205 make_poly_country(liss):=map('make_polygon,liss)$
210 As above, but for continents or list of countries.
212 [1] apply(draw2d,make_poly_continent(European_Union))$
213 Draws the European Union. make_poly_country returns a list of
214 polygons, that's why we use apply.
216 make_poly_continent(liss):=flatten(map('make_poly_country,liss))$
221 Returns the extreme coordinates of the n-th boundary.
225 li:list_to_pairs(listarray(boundaries_array[n]))
226 [first(li),last(li)])$
230 This function is very convenient for detecting coastlines,
231 taking away repeated indices (boundaries).
234 block([out:[],n:length(lis)-1,temp],
237 then out: cons(lis[1],out),
239 then out: cons(lis[n+1],out),
242 if (temp # lis[k-1]) and (temp # lis[k+1])
243 then out: cons(temp,out)),
248 /*************************/
250 /* C O U N T R I E S */
252 /*************************/
257 The following variables define segment numbers to build country borders.
258 Those countries with islands need more than one list of segments.
262 [[1119,1130,1132,1136,1137,1131,1129,1127,1104,1107,1100,1097,1116]]$
265 [[1844,1076,1065,1062,1060,1042,1035,1039,1040,1044]]$
268 [[123,152,164,166,169,184,218,222,239,236,224,194,148,
269 1879,1882,1900,1899]]$
275 [[2566,2591,2614,2615,747,746,761,763,762,753,728,712,701,
276 702,671,672,675,674,666],
280 [[2799,2798,2790,2785,2794,2792,2783,2784,2787,2797,2800],
281 [2791],[2789],[2782],[2786],[2781],[2779],[2778],[2777],
282 [2776],[2775],[2774],[2793],[2780],[2788]]$
288 [[801,829,838,839,840,841,842,843,844,845,846,847,848,849,850,
289 851,852,853,854,855,856,857,858,859,860,861,2745,2718,2699,
290 2695,834,830,819,812,822,825,824,823,820,804,802,789,792,
291 797,798,785,784,796],
292 [862,863,864,2768,2748],[2765]]$
298 [[1067,1075,1088,1087,1086,1058]]$
301 [[2672,2681,2677,2670,2680,2682,2685,2687,2689,
302 2688,2684,2671,2665,2655,2640,2623,2600,2593,2618,
303 2616,2598,2590,2592,2603,2604,2617,2634,2639,2657,2667],
304 [2683],[2691],[2692],[2693],[2696,2701,2698],[2661],
305 [2653],[2611],[2597],[2587],[2585],[2662]]$
308 [[964,967,969,972,971,976,978,975,974,973,
309 959,958,947,941,940,930,931,933,934,932,
313 [[1057,1061,1086,1085,1080,1084,1092,1091,1081],
317 [[1988],[1994],[2007],[2016],[2004],[2009],[2020],[2028],[2047]]$
326 [[1703,1718,919,917,1608,1670]]$
329 [[866,865,867,869,868,18,888,16,15,14,1725,13,1726]]$
335 [[187,192,200,208,2040,2039,2050,223,216,198,190,186,182,180],
339 [[265,264,2100,244,246,247,249]]$
342 [[451,464,465,2277,463,433,413,363,361,357,364,369,377,378]]$
348 [[719,725,740,750,773,799,796,784,785,798,797,792,789,788,
349 779,772,777,776,775,774,767,765,751,749,748,734,731,722,
350 720,711,693,692,694,695,699,700,697]]$
352 Bosnia_and_Herzegovina:
353 [[1028,1816,1031,1030]]$
356 [[807,818,817,811,809,806,805,786,782,781,778,771,768]]$
359 [[649,670,696,698,697,700,699,695,694,692,693,711,
360 720,722,731,734,748,749,751,765,767,774,775,776,
361 783,787,790,791,803,808,810,812,819,830,835,836,
362 837,2674,2673,2658,2652,2643,2608,2584,2559,2512,
363 2491,2480,2481,2478,2479,2475,2465,2461,2451,532,
364 541,545,562,552,546,507,481,508,573,563,548,565,574,643],
365 [2664],[2467],[2458],[2450],[2432],[2427],[2420],[2423],
369 [[497,2313],[2317,504]]$
372 [[1034,1053,1056,1048,1047,1822,1806,1023,1024,1025]]$
375 [[401,407,405,386,383,378,377,369,364,358,317,318,325,352,360,388,390]]$
378 [[633,634,652,654,650,638,636,629,624,617,611,612,619,618,613,614,627,628]]$
381 [[2089],[2113],[2112],[2097]]$
383 /*lake not included*/
385 [[2190,391,370,368,365,359,310,302,292,287,303,300,299,296,366]]$
387 /*lakes not included*/
389 [[3,4,5,1604,1691,1730,1742,1758,1759,1760,
390 23,22,21,20,19,24,25,28,27,29,33,32,30,31,37,35,
391 34,48,66,79,80,81,85,90,92,87,76,75,72,74,
392 68,67,64,63,62,61,60,59,49,47,39,40,54,55,56,58,
393 1793,1809,1810,1794,1782,1768,1777,1778,1752,1737,
394 1717,1681,1629,1580,1548,1563,1564,1516,1553,
395 1597,1625,1683,1731,1732,1694,1627,1555,1503,1476,
396 1455,1436,1432,1419,1362,1418,1437,1426,1441,1422,1399,1400],
397 [1673],[1686],[1688],[1687],[1704],[1678],[1698],[1700],
398 [1701],[1713],[1720],[1733],[1743],[1761,1764],[26],[50],
399 [57],[1790],[1785],[1772],[1754],[1638],
400 [1770,1775,1780,1771,1755,1744,1747],[1765],[1584],[1523],
401 [1594],[1606],[1599],[1504],[1510],[1492],[1487],
402 [1498],[1482,1491],[1451],[1448],[1500],
403 [1472,1493,1508,1499,1495,1465,1463,1449,1433,
404 1412,1376,1352,1324,1346,1344,1350,1371,1420,1438,1454],
405 [1512],[1509],[1501],[1310],[1379],[1380],[1393],
406 [1386],[1429],[1424],[1409],[1526],
407 [1322],[1306],[1356],[1385],[1296],[1306],[1331,1332],
408 [1398],[1405],[1382],[1383],[1408],[1381],[1333,1367,1406,1401,1394,1341,1325],
409 [1316,1335],[1397],[1268],[1265],[1250],[1234],[1241],
410 [1275,1289],[1225],[1248],[1258],[1261],[1267],[1272],
411 [1273],[1283],[1253],[1239],[1235],[1231],[1233],[1213],
412 [1266],[1245],[1284,1285,1276],[1254],[1217,1228],
413 [1189,1201,1224,1257,1259,1247,1216,1191]]$
416 [[105,106,107,1121]]$
419 [[2328,2368,537,536,535,528,529,538,539,550,549,531,522,516,
420 503,501,482,478,471,470,443,436,400,351,335,334,339,342,
421 350,408,462,456,472,473,480,486]]$
423 Central_African_Republic:
424 [[470,471,478,482,501,503,516,522,531,530,511,500,493,
425 484,428,385,416,419,432,440,441,438,444]]$
428 [[253,257,301,312,319,324,327,334,335,351,400,436,443,444,
429 438,441,440,432,419,416,385,384,336,266,232]]$
432 [[2654,2669,2694,2705,2714,2715,2725,2741,2750,2753,2746,861,
433 860,859,858,857,856,855,854,853,852,851,850,849,848,847,846,845,844,
434 843,842,841,840,839,838,829,801,799,773,769],
435 [2700],[2703],[2708],[2707],[2709],[2710],[2711],[2712],[2713],
436 [2719],[2720],[2719],[2720],[2721],[2723],[2724],[2722],[2726],
437 [2727],[2730],[2729],[2731],[2732],[2735],[2736],[2733],[2738],
438 [2737],[2739],[2740],[2743],[2747],[2749],[2752],[2754],[2755],[2756],
439 [2757],[2769],[2767],[2771],[2770],
440 [2758,2766,2763,2762,2761,2760,2759,864,863,862]]$
443 [[1090,1098,1104,1115,1121,1124,1134,1140,1144,1143,1141,
444 1139,1154,1153,1163,1164,1171,1170,1169,1165,1167,1172,1161,
445 1160,1166,1168,2044,2057,2043,205,2029,2021,203,1157,1156,
446 2024,2023,2006,1977,1945,1906,1875,1859,1834,1851,1074,1072,
447 1069,1068,1070,1033,1010,1011,937,936,961,960,925,922,924,
448 962,955,948,965,1002,1027,1051,1052,1029,1018,970,929,949,1037,1079],
449 [2074],[1949],[1929],
450 [206],[207] /*Macau*/ ]$
453 [[2501,2511,663,659,660,661,647,645,642,641,632,586,576,551,
454 526,523,521,517,530,549,550,539,560,559,596,640]]$
457 [[2264,2382,2393,2394,554,553,561,568,572,571,582,622,625,639,644,
458 643,574,565,548,563,558,520,515,502,468,466,452,450,410,2181,
465 [[2183,2210,2223,2237,429,411,402,404,2209,387,382]]$
468 [[399,403,421,422,442,460,461,496,2324,483,477,476,475,
469 417,407,401,396,395,389,393,398]]$
472 [[1815,1028,1014,998,999,990,980,1005], /*continental*/
473 [1819,1032,1031], /*continental_south*/
478 [[2058,2062],[2042]]$
484 [[887,891,893,931,930,895,1745,1739]]$
487 [[884,883,1635,1613,1585,1577,1572,1573,1588,1630], /*continental*/
491 [1639], /*langeland*/
493 [1649,1617], /*sjaelland*/
495 [1505],[1507] /*feroe*/ ]$
498 [[374,379,376,2180,2178,372]]$
501 [[2399,567,536,537],[2353]]$
504 [[2443,2459,2474,2500,640,596,559,560,538,529,528,535,567]]$
507 [[1238,1263,1298,1330,1413,1431,1453,1471,1496,
508 1514,1520,1530,1511,1486,1452,1443,1427,1407,
509 1358,1338,1299,1271,1237,1200,1185,1184,1182,
510 1181,1178,1177,1175,1173,1174,1176,1187,1210],
511 [1242],[1240],[1327],[1334],[1336],[1384],[1378],
512 [1518],[1517],[1527],[1532],[1535],[1497],[1490],
513 [1466],[1450],[1357],[1320],[1312],[1302],[1292],
514 [1280],[1274],[1264],[1236],[1232],[1222],[1219],
515 [1209],[1179],[1180]]$
521 [[237,240,241,242,245,2081]]$
524 [[2463,2493,2494,656,655,657,662,646,635,590,587,584,583,
525 582,571,572,568,561,553,554],
527 [2433],[2452],[2430],[2445],[2449] /*galapagos*/ ]$
530 [[210,214,211,219,212,2018,1983,1963,151,149,146,144,141,138,
531 1936,1933,1934,1940,1941],
532 [138,141,144,146,149,151,1970,1981,1967,154,137,1938,1937]]$
535 [[2130,2136,322,320,307,304,305,306,298,295,291,293,294,297,311]]$
539 [[1562,1569,916,1541], /*continental*/
541 [1561] /*saaremaa*/]$
543 /*lake not included*/
545 [[254,256,272,338,373,423,424,458,487,494,495,512,506,505,
546 499,485,430,431,415,379,374,372,2150,2149,2117,2091],
550 [[2629],[2621],[2613]]$
553 [[1484,1515,1531,1534,913,911,910,909,908,903,
554 906,907,1390,1430,1446], /*continental*/
559 [[1748,1763,1766,1774,1788,1797,1812,879,880,881,882,1818,1814,878,
560 1804,1022,1009,877,875,876,874,873,872,871,896,894,892,870,868,869,
561 867,865,866], /*continental*/
565 [[514,525,527,541,532,2335,2334]]$
571 [[1813,1828,1059,1058,1061,1041]]$
574 [[883,884,1641,1650,1684,885,886,888,889,890,892,894,896,897,899,898,
575 963,966,953,938,932,934,933,893,891,887,1729,1705,1679,1674,1669,
577 [1671,1672] /*usedom*/ ]$
580 [[417,475,476,477,483,2307,2306,2315,467,459,455,406,394,386,405]]$
583 [[1858,1886,1885,1865,1841,1066,1050,1049,
584 1048,1056,1063,1064,1076], /*continental*/
586 [1861], /*kefalonia*/
587 [1871], /*zakynthos*/
606 [[2124,311,297,294,293,288,279,267,2104,
607 264,265,255,263,278,286]]$
610 [[2220,414,409,412,426,425,420,437,446,445,449,448,439,442,
611 422,421,403,399,397,381,371,354,348,347,353,355,356,345,
615 [[2186,380,349,346,344]]$
618 [[427,434,453,457,469,479,481,507,546,552,562,544,543,513,2295,2281]]$
621 [[2077,245,242,241,240,237],[2070]]$
624 [[291,295,298,306,305,304,307,320,322,2141,332,330,
625 326,314,309,308,2111,2102,2105,267,279,288]]$
628 [[958,959,973,977,980,990,999,998,995,988,983,
629 951,943,942,944,945,954,956,946]]$
632 [[1464,1479,1485,1467,1457]]$
635 [[2027,2051,2066,2121,2205,2211,2206,2236,2229,2197,
636 2115,2072,2041,2036,208,200,192,187,180,182,186,190,
637 198,216,217,204,199,193,179,1139,1141,173,171,1144,
638 170,176,175,168,159,150,1134,1124,107,106,105,1117,
639 1122,1123,1125,1126,1128,1142,1149,1150,1152,1151,1155],
640 [2146,2166,2165,2164], [2170,2177],[2189],[2259]]$
643 [[2453,2525,2524,2426,2386],[2390],[2397],[2400],[2406],
644 [2403],[2367],[2407],[2436],[2466],[2476],[2486],[2492],
645 [2518],[2489],[2490],[2404],[2441],[2429],[2344],
646 [2482,2496,2503,2434,518,524,540,542,547,569],
648 [2539,2557,2537],[2558],[2560],[2562],[2561],[2548],
649 [2555],[2553],[2551],[2542],[2574],[2578],[2582],
650 [2575,2567],[2547],[2544],[2543],
651 [2521,2519,2510,2470,2457,2415,2446],
652 [2532],[2517],[2513],[2520],[2504],[2460],[2471],
653 [2469],[2477],[2464],[2435],[2447],[2379],[2350],[2337],
654 [2448,2419,2425],[2498],[2497],[2499], [2526],[2527],
655 [2535],[2530],[2550],[2549],[2472],[2456],[2431],[2468],[2454],
656 [2485,2505,2536,2563,685,669,668,2483,2495,2487] ]$
659 [[1101,1102,1118,1120,1133,1135,1948,1971,1989,1999,1148,
660 1147,1146,1145,1138,1136,1132,1130,1119,1114,1108,1093,
661 1096,1110,1092,1084,1080,1085,1087,1089,1078]]$
663 /*lake not included*/
665 [[122,142,155,157,161,160,1950,1135,1133,1120,
666 1118,1105,101,103,108]]$
669 [[1623,1699,1712,1719,1702,1677,7,6]]$
672 [[1928,1930,1932,137,154,1953,153,145,140,139,135,134,129,130,
673 125,124,120,117,116,114,113,112,111,110]]$
676 [[1009,1022,1821,1839,1864,1863,1835,1803,1000,976,
677 987,997,994,992,991,984,993,989,996], /*continental*/
679 [1849] /*sardinia*/ ]$
687 [1867],[1912],[1926],
689 [1924,1939], /*kyushu*/
690 [1910],[1922],[1944],[1942],[1972],[1991] ]$
693 [[117,120,127,128,134,135,139,140,145,153,1952,1955,158,122,121,115]]$
695 /*lake not included*/
697 [[986,1046,1055,1054,1001,985,1017,1020,1071,1038,1037,949,928,979],
701 [[498,564,575,577,578,585,597,608,609,610,631,637,658,2507,
702 603,519,506,512,495,494,488,489,490,492]]$
705 [[1073,1082,1079,1038]]$
708 [[165,1966,1965,1947,160],[1951]]$
711 [[228,252,251,250,271,290,296,299,300,303,287,292,
712 285,261,260,258,234,233,229,230,1172,220,226]]$
715 [[1601,1609,1608,1598,1569,1566]]$
718 [[1918,110,109,104,102]]$
724 [[2323,496,461,460,439,448,449,445,446,437,420,435,454]]$
727 [[147,194,201,232,231,210,1935,1943]]$
733 [[1618,1658,1667,1670,1609],
740 [[1060,1062,1065,1064,1063,1053,1043]]$
743 [[2601,2635,2660,2659,2638,2606]]$
746 [[690,717,744,743,739,727,724,723,718,691,688]]$
749 [[2376,2396,2347,474], [2274],
750 [569,547,542,540,524,518,2330,2310,497,2314,2311,504,2395],
754 [[2251],[2252],[2253],[2254],[2257],[2258],[2260],[2261],[2262],
755 [2263],[2265],[2268],[2270],[2271],[2272],[2273],[2276],[2278],
756 [2279],[2282],[2283],[2284],[2286],[2289],[2290],[2291],[2292],
757 [2293],[2296],[2297],[2298],[2299],[2301],[2302],[2303],[2304],
758 [2305],[2309],[2312],[2316],[2319],[2320],[2321],[2322],[2325],
759 [2327],[2329],[2331],[2332],[2333],[2336],[2338],[2339],[2341],
760 [2342],[2343],[2345],[2346],[2348],[2349],[2351],[2352],[2354],
761 [2355],[2356],[2357],[2358],[2359],[2360],[2361],[2362],[2363],
762 [2364],[2365],[2366],[2369],[2370],[2371],[2372],[2373],[2374],
763 [2375],[2377],[2378],[2380],[2381],[2383],[2384],[2385],[2387],
764 [2388],[2389],[2401],[2402],[2405],[2408],[2409],[2410],[2411],
765 [2413],[2414],[2416],[2417],[2418],[2428],[2437],[2438],[2439],
766 [2440],[2442],[2444]]$
769 [[197,268,269,274,275,283,284,289,315,340,343,356,355,353,347,
770 348,354,371,381,397,398,393,389,395,396,390,388,360,352,325,
771 318,317,281,280,270,239,222,218,185]]$
781 [[2094,273,282,284,283,275,274,269,268,197,185,184,177,178,195,196,221,225]]$
786 /*lake not included*/
788 [[1954,1990,2019,1984,1985,2061,2085,2106,2110,
789 2116,286,278,263,255,249,247,246,244,2073,2063,
790 2075,2076,2049,181,174,172,156,162,126,132,133,
792 [1975],[1959],[1964],[2056]]$
800 /*lake not included*/
802 [[970,1018,1029,1052,1051,1027,1002,965,948,955,962,927,923,921,926]]$
805 [[1927,1982,167,166,164,152,123,1898,1893,1895]]$
808 [[721,726,742,741,745,766,770,780,793,813,814,816,815,2663,2656,
809 2637,2627,2599,703,708,705,715,723,724,727,739,743,744]]$
812 [[2065,2069,2067,2099,2103,2131,2203,392,323,248,
813 243,227,226,220,1167,1165,1169,1170,1171,1164,
814 1163,1153,1154,179,193,199,204,217,223],
815 [2064],[2071],[2101],[2162],[2176]]$
818 [[2648,795,800,2666,827,826,807,768,771,754,752,762,763,761,746,747]]$
821 [[150,159,168,175,176,170,1140]]$
823 /*lake not included*/
825 [[1685,1708,1721,14,15,16,886,885],
826 [13,1724] /*south_zeeland*/ ]$
829 [[2686,2697,2690],[2702,2716,2706],[2717],[2734]]$
831 /*lake not included*/
833 [[2159,2182,382,387,2185,2172,2127,308,309,314,326,330,332]]$
836 [[358,357,361,363,362,331,337,328,316,313,312,301,257,253,201,
837 224,236,270,280,281]]$
840 [[413,433,463,2326,2318,486,480,473,472,456,462,408,350,
841 342,339,327,324,319,313,316,328,337,331,362]]$
844 [[1870,99,1853,1036,1070,1068,1069,1072,1074]]$
847 [[1547,1543,1542,1475,1474,1473,907,906,1368,1423,
848 1469,1506,1549,1559],
849 [1373,903,904,905,902,901,900,1370], /*continental*/
850 [1345],[1355],[1354],[1359],[1360],[1366],
851 [1365],[1369],[1377],[1387],[1391],[1402],
852 [1411],[1415],[1417],[1456],[1480],[1483],
853 [1488],[1521], /*small islands close to the continent*/
854 [1252],[1227],[1243],[1223],[1220],[1218],
855 [1206],[1256],[1290], /*svalbard archipelago*/
859 [[259,2090,2084,2060,2054,202,238],[2059],[183,1996]]$
862 [[1138,1145,1146,1147,1148,2000,2010,2013,2014,2015,2017,1155,
863 1151,1152,1150,1149,1142,1128,1126,1125,1123,1122,1117,1115,
864 1127,1129,1131,1137]]$
866 Palestinian_Authonomy:
867 [[124,125,130,129,128,127]]$
870 [[2238,2249,2239,2225,2235,2248,447,2228,2215,2214,2227,
871 2226,404,402,411,429],
875 [[668,669,685,2565,2577,2579,2533],
876 [2568],[2570],[2573],[2564],[2583],[2564],[2583],
880 [[802,804,820,823,824,825,822,810,808,803,791,790,
881 787,783,777,772,779,788]]$
884 [[2545,2595,2622,769,750,738,729,733,725,719,698,696,670,649,
885 644,639,625,622,583,584,587,590,635,646,662,657,655,656]]$
888 [[2096,2119,2135,2123,2147,2158,2122,2107],
889 [2114],[2134],[2128],[2169],[2167],[2174],[2184],[2179],[2200],
890 [2129,2168],[2173],[2191],[2194],[2212],[2200],[2204],[2218],
891 [2207,2208],[2256,2245,2288,2294,2269,2240],[2267],[2287],[2308],
892 [2187,2222,2234,2196]]$
895 [[1671,1676,1679,1705,1729,1739,1745,1751,1753,1757,1756,1750,1734,
896 1718,1703,1667,1660,1661,1653,1654,1659,1668]]$
899 [[1877,1876,100,98,97], /*continental*/
900 [1856],[1852],[1868], /*azores*/
901 [1921] /*madeira*/ ]$
913 [[983,1012,1015,1019,1025,1024,1023,1805,1798,
914 1008,1007,1004,939,957,952,950]]$
916 /*lakes not included*/
918 [[900,901,902,905,904,908,909,910,911,913,1519,1540,916,1598,917,
919 968,1779,1811,1041,1057,1045,1016,979,928,929,926,921,923,927,924,
920 922,925,960,961,936,937,1011,1010,1033,1036,1820,1762,1682,1545,
921 1728,1697,1536,1502,1461,1458,1440,1389,1404,1342,1351,1314,1305,
922 1363,1364,1428,1442,1434,1439,1410,1414,1435,1445,1477,1478,
923 1444,1416], /*continental*/
924 [1653,1655,1660,1658,1631,1616,1652], /*kaliningrad*/
925 [1202],[1208],[1204],[1207],[1205],[1212],
926 [1203],[1198],[1193],[1186],[1199],[1196],
927 [1197],[1194],[1190],[1188],[1183],
928 [1300,1288,1281],[1323,1353],[1343],
929 [1396],[1372],[1304],[1297],[1308],[1319],
930 [1311],[1195],[1215],[1262],[1270],[1293],
931 [1286],[1279],[1287],[1277],[1246],[1249],
932 [1260],[1192],[1211],[1214],[1221],[1211],
933 [1230],[1226],[1229],[1244],[1255],[1291],
934 [1303],[1318],[1317],[1309],[1313],[1315],
935 [1321],[1329],[1269],[1282],[1278],[1251],
936 [1295],[1294],[1301],[1375],
937 [1349,1347,1337,1328], [1340,1339], /*arctic_islands*/
938 [1552],[1643],[1651],
939 [1632],[1648],[1786,1692],[1735],[1740],[1749],
940 [1776],[1789],[1800],[1808],
941 [1395,1470,1468,1459,1460] ]$
944 [[604,605,620,621,626,628,627,614,613,618,619,612,611,617,616,615,607,600,602]]$
952 Sao_Tome_and_Principe:
956 [[1956,1974,1978,2008,2053,2092,262,277,276,238,209,2003,
957 165,163,157,155,142,158]]$
960 [[2126,321,329,2161,2160,344,345,343,340,315,289,282,273,2095]]$
963 [[1014,1030,1032,1825,1044,1040,1039,1035,1042,1043,1034,1019,1015,
970 [[2255,454,435,425,426,412,409,414], [2244]]$
976 [[940,941,947,946,956,954,945,944,935,1753,1751,895]]$
979 [[1000,1791,1005,977,974,975,978]]$
982 [[2538],[2540],[2546],[2554],[2556],[2552],[2572],[2569],[2571],[2580],[2586]]$
985 [[415,431,430,485,499,505,519,603,2462,2422,2340,2247,2192,2193,376]]$
988 [[2676,2678,2675,2668,815,816,821,813,794,805,806,809,811,817,818,826,827],
989 [2650,2651,800,795]]$
992 [[1866,1889,1911,1901,1854,99],
996 [[1817,1824,97,98,100,1890,1873,882,88,880,879], /*continental*/
997 [1850],[1847],[1842], /*baleares*/
998 [1968],[1976],[1980],[1973],[1962] /*cannary_islands*/ ]$
1006 St_Vincent_and_Grenadines:
1007 [[2137],[2142],[2143],[2144],[2145],[2148],[2152],[2153],[2157],[2156]]$
1010 [[231,266,336,384,428,484,510,509,498,492,490,489,488,487,458,
1011 424,423,373,338,272,256,254,2078,2034,2026,212,219,211,214]]$
1014 [[513,543,544,545,527,525,514,2300]]$
1020 [[1473,1474,1475,1542,1543,1547,1596,1614,1612,
1021 1565,1513,1481,1446,1430,1390], /*continental*/
1024 [1581] /*gotland*/]$
1027 [[871,872,873,874,876,875,877,996,989,993,984,991,992,
1028 994,997,987,971,972,42,41,967,964,898,899,897]]$
1031 [[1902,1905,102,104,109,111,112,113,114,116,115,121,
1032 108,103,101,1103,1106,1109,1111,1112,1113]]$
1038 [[1099,1107,1098,1090,1082]]$
1041 [[600,607,615,616,624,629,636,638,650,654,667,682,681,
1042 687,688,691,704,706,705,708,703,2576,658,637,631,610,609,
1043 608,623,630,606,593,592,599]]$
1046 [[2266,474,2275,2216,2154,2175,366,290,271,250,251,252,
1047 228,227,243,248,323,392],
1051 [[394,406,455,459,467,2280,465,464,451,383]]$
1053 Trinidad_and_Tobago:
1057 [[148,147,1916,1897],[1913]]$
1060 [[1047,1049,1050,1066,1840,1823], /*europa*/
1061 [1845,1883,1887,1891,1113,1112,1111,1109,1106,1103,1105,
1062 1102,1101,1078,1077,1075,1067,1059,1833,1832,1831] /*asia*/ ]$
1065 [[1083,1095,1096,1093,1108,1114,1116,1097,1094,1055]]$
1067 /*lake not included*/
1069 [[1734,1750,1756,1757,935,942,943,951,950,952,957,939,
1070 1003,1007,1008,1792,1787,1784,1783,1801,1781,968,919]]$
1072 United_Arab_Emirates:
1073 [[209,202,2001,183,2012,188,189,2002]]$
1076 [[1560,1586,1646,1693,1727,1741,1738,1723,1675,1642,1590],
1077 [1665,6,7], /*north_ireland*/
1078 [1533], /*shetland*/
1081 [1570],[1574], /*outer_hebrides*/
1083 [1591],[1610],[1607], /*internal_hebrides*/
1086 [1689], /*anglesey*/
1090 [[2679,837,836,835,834]]$
1092 /*lake not included*/
1094 [[1767,1773,1796,1826,1857,1880,1909,1919,1923,118,119,131,
1095 133,132,126,162,156,172,174,181,1993,1992,1969,1958,
1096 1961,1960,1946,1957,1987,1998,1997,1979,1931,1917,1908,
1097 1896,1884,1874,1855,1838,1827,1802,58,56,55,54,40,39,47,
1098 49,59,60,61,62,63,64,67,73,70,72,75,76,89,95,91,85,81,78,82,94,83,
1099 53,46,45,37,31,30,32,33,29,27,28,25,24,19,20,21,22,23],
1100 [1769],[1837],[65],[51],[43],[38],
1101 [3,1374,1361,1421,1447,1489,1524,1554,1621,1636,1568,1544,1539, /*alaska*/
1103 [1571],[1576],[1579],[1587],[1589],[1592],[1595],[1600],
1104 [1602],[1603],[1605],[1619],[1628],[1640],[1644],
1105 [1715],[1714],[1716],[1707],[1706],[1690],[1680],[1664],
1106 [1657],[1620],[1633],[1537],[1525],
1107 [1551],[1494],[1522],[1538]]$
1109 Aleutian_Islands_West: [[1695],[1711],[1722]]$
1110 Hawaii: [[2038],[2045],[2046],[2052],[2068]]$
1113 [[533,566,570,580,581,588,589,601,602,599,592,591,
1114 579,578,577,575,564,509]]$
1117 [[1054,1094,1100,1099,1073,1071,1026]]$
1120 [[410,450,452,466,468,502,515,520,558,573,508,479,469,457,453,
1121 434,427,2232,2233,2230,2224,2202,2198,2219],[2188]]$
1124 [[2217,2231,2213,2195,2138,2087,2055,1168,1166,
1125 1160,1161,230,229,233,234,258,260,261,285,302,
1126 310,359,365,368,370,391],
1130 [[2011,2048,225,221,196,195,178,177,169,167]]$
1133 [[2132,2151,2155,2118,259,276,277,262],
1137 [[666,674,675,672,671,702,701,709,713,710,689,686,680,679,678,
1138 673,648,634,633,626,621,620,605,604,601,589,588,581,580,570,557,
1139 533,510,493,500,511,517,521,523,526,551,576,586,632,641,642,645,
1140 647,661,660,659,664,665,2528]]$
1143 [[712,728,753,752,754,764,760,759,735,726,721,717,
1144 690,687,681,684,679,680,686,689,710,713,709]]$
1147 [[778,781,782,786,794,793,780,770,766,745,741,742,735,
1148 755,757,758,760,764]]$
1156 /*****************************************************************/
1158 /* O T H E R G E O G R A P H I C A L E N T I T I E S */
1160 /*****************************************************************/
1162 World_boundaries:makelist(k,k,0,2800)$
1165 [Austria, Belgium, Bulgaria, Cyprus, Czech_Republic, Denmark,
1166 Estonia, Finland, France, Germany, Greece, Hungary, Ireland,
1167 Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands,
1168 Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden,
1172 append(European_Union,
1173 [Belarus,Moldova,Ukraine,Iceland,Norway,Albania,
1174 Andorra,Bosnia_and_Herzegovina,Croatia,Macedonia,Serbia,Liechtenstein,
1175 Monaco,Switzerland,San_Marino])$
1178 [Greenland,Canada,United_States,Mexico,Cuba,Bahamas,Jamaica,
1182 [Belize,Costa_Rica,El_Salvador,Guatemala,Honduras,Nicaragua,Panama,
1183 Trinidad_and_Tobago,Grenada,Barbados,Martinique,Santa_Lucia,
1184 St_Vincent_and_Grenadines,Dominica,Guadalupe,Antigua_and_Barbuda,
1185 St_Kitts_and_Nevis]$
1188 [Argentina,Bolivia,Brazil,Chile,Colombia,Ecuador,Malvinas,French_Guiana,
1189 Guyana,Paraguay,Peru,Suriname,Uruguay,Venezuela]$
1192 [Australia,New_Zealand,Fiji,Papua_New_Guinea,Solomon_Islands,Indonesia]$
1195 [Kazakhstan,Kyrgyzstan,Tajikistan,Turkmenistan,Uzbekistan,China,Japan,
1196 Mongolia,North_Korea,South_Korea,Taiwan,Russia,Cambodia,
1197 Laos,Malaysia,Myanmar,Philippines,Singapore,Brunei,Thailand,Vietnam,
1198 Afghanistan,Bangladesh,Bhutan,India,Iran,Maldives,Nepal,Pakistan,
1199 Sri_Lanka,Armenia,Azerbaijan,Bahrain,Palestinian_Authonomy,Georgia,
1200 Iraq,Israel,Jordan,Kuwait,Lebanon,Oman,Qatar,Saudi_Arabia,Syria,
1201 Turkey,United_Arab_Emirates,Yemen]$
1204 [Burundi,Comoros,Djibouti,Ethiopia,Kenya,Madagascar,Malawi,Mauritius,
1205 Mozambique,Reunion,Rwanda,Seychelles,Somalia,Tanzania,Uganda,Zambia,
1206 Zimbabwe,Angola,Cameroon,Central_African_Republic,Chad,
1207 Congo_Republic,Equatorial_Guinea,Gabon,Algeria,Egypt,Libya,Morocco,
1208 Sudan,Tunisia,Western_Sahara,Botswana,Lesotho,Namibia,South_Africa,
1209 Swaziland,Benin,Burkina,Cabo_Verde,Cote_Ivoire,Gambia,Ghana,Guinea,
1210 Guinea_Bissau,Liberia,Mali,Mauritania,Niger,Nigeria,Senegal,Sierra_Leone,
1211 Togo,Zaire,Sao_Tome_and_Principe]$
1214 /******************************/
1216 /* C O A S T L I N E S */
1218 /******************************/
1220 America_coastlines:coastlines(flatten([North_America,Central_America,South_America]))$
1222 Eurasia_coastlines:coastlines(flatten([Europe,San_Marino,Asia]))$
1224 Africa_coastlines:coastlines(flatten([Africa,Lesotho]))$
1226 Oceania_coastlines:coastlines(flatten([Oceania]))$
1228 Antarctica_coastlines:coastlines(flatten([Antarctica,[2799,2800]]))$
1230 World_coastlines:flatten([America_coastlines,Eurasia_coastlines,
1231 Africa_coastlines,Oceania_coastlines,
1232 Antarctica_coastlines])$