diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-04 21:12:22 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 2f2cb76ed5d1ce7184f3f4186f494e2b1499c8f9 (patch) | |
tree | 4e40ba168c39125ed9dd8f1e93d8715324967c8d /tools/gendata.js | |
parent | 35f785f304c89ba5fe7f61d9959727e96e2b8706 (diff) | |
download | plantagenet-2f2cb76ed5d1ce7184f3f4186f494e2b1499c8f9.tar.gz |
Crop map graphic to physical size.
Diffstat (limited to 'tools/gendata.js')
-rw-r--r-- | tools/gendata.js | 248 |
1 files changed, 123 insertions, 125 deletions
diff --git a/tools/gendata.js b/tools/gendata.js index 555d6a7..e7af2fa 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -11,134 +11,132 @@ function clean_name(name) { return name.toLowerCase().replaceAll("&", "and").replaceAll(" ", "_") } -// :r !python3 genboxes.py +// :r !node tools/genboxes.js const boxes = { - "0": [60,1613,48,48], - "1": [109,1613,47,48], - "2": [156,1613,46,48], - "3": [203,1613,46,48], - "4": [249,1613,48,48], - "5": [297,1613,47,48], - "6": [344,1613,48,48], - "7": [392,1613,47,48], - "8": [439,1613,46,48], - "9": [485,1613,47,48], - "10": [532,1613,49,49], - "11": [581,1613,47,49], - "12": [628,1613,47,49], - "13": [675,1613,48,49], - "14": [723,1613,46,48], - "15": [769,1613,48,48], - "16": [817,1613,47,48], - "17": [864,1613,48,48], - "18": [911,1613,46,48], - "19": [958,1613,48,48], - "20": [1006,1613,46,49], - "21": [1052,1613,48,49], - "22": [1100,1613,47,49], - "23": [1147,1613,48,49], - "24": [1195,1613,46,49], - "25": [1241,1615,49,47], - "26": [1241,1568,49,47], - "27": [1241,1520,49,47], - "28": [1241,1472,49,47], - "29": [1241,1426,49,46], - "30": [1241,1378,49,48], - "31": [1241,1330,49,48], - "32": [1241,1282,49,48], - "33": [1241,1236,49,46], - "34": [1241,1189,49,47], - "35": [1241,1142,49,47], - "36": [1241,1095,49,46], - "37": [1241,1048,49,47], - "38": [1241,998,49,50], - "39": [1241,952,47,46], - "40": [1241,903,47,48], - "41": [1241,857,47,46], - "42": [1241,812,51,45], - "43": [1241,762,51,50], - "44": [1241,714,51,48], - "45": [1241,668,47,46], - "Scotland": [488,316,111,118], - "France": [928,1468,109,114], - "Calais": [1172,1456,67,79], - "Ireland": [88,987,110,121], - "Burgundy": [1034,726,110,121], - "Bamburgh": [675,338,60,45], - "Carlisle": [474,460,81,63], - "Hexham": [599,433,53,47], - "Appleby": [584,503,57,52], - "Newcastle": [694,457,70,77], - "Scarborough": [829,570,78,57], - "York": [729,661,76,65], - "Lancaster": [514,633,70,51], - "Ravenspur": [873,759,72,45], - "Lincoln": [805,798,78,64], - "Chester": [471,835,78,64], - "Derby": [694,883,62,49], - "Nottingham": [756,883,73,40], - "Lichfield": [651,944,74,61], - "Truro": [180,1483,56,53], - "Launceston": [239,1392,68,60], - "Exeter": [381,1417,64,66], - "Dorchester": [562,1406,58,49], - "Southampton": [715,1409,60,48], - "Arundel": [832,1372,56,48], - "Hastings": [1021,1360,55,46], - "Dover": [1079,1325,53,41], - "Canterbury": [1097,1241,66,65], - "Rochester": [1021,1223,65,68], - "London": [912,1202,94,72], - "Guildford": [879,1287,74,59], - "Winchester": [760,1300,71,60], - "Salisbury": [648,1306,73,66], - "Wells": [542,1300,68,66], - "Bristol": [536,1223,63,58], - "Newbury": [703,1232,66,44], - "Oxford": [745,1139,70,63], - "St Albans": [939,1130,54,40], - "Cambridge": [939,1059,54,45], - "Bedford": [874,1082,65,48], - "Northampton": [786,1051,64,54], - "Gloucester": [602,1130,68,62], - "Hereford": [514,1078,71,65], - "Cardiff": [430,1202,65,65], - "Pembroke": [223,1165,58,37], - "Ipswich": [1138,1068,58,43], - "Bury St Edmunds": [1035,1033,54,45], - "Norwich": [1097,928,67,62], - "Lynn": [1000,933,47,38], - "Ely": [959,990,65,66], - "Peterborough": [866,968,66,62], - "Leicester": [796,944,49,46], - "Coventry": [713,1005,67,63], - "Worcester": [594,1030,72,64], - "Ludlow": [514,1014,54,34], - "Shrewsbury": [538,903,78,69], - "Harlech": [316,950,67,61], - "Plymouth": [291,1455,58,50], - "Irish Sea": [271,705,160,93], - "English Channel": [602,1499,173,69], - "North Sea": [1144,787,97,117], - "box16": [1285,296,65,155], - "box1": [238,72,103,163], - "box2": [341,72,103,163], - "box3": [444,72,99,163], - "box4": [544,72,103,163], - "box5": [646,72,104,163], - "box6": [773,72,102,163], - "box7": [875,72,102,163], - "box8": [977,72,102,163], - "box9": [1079,72,99,163], - "box10": [1178,72,102,163], - "box11": [773,296,107,155], - "box12": [880,296,97,155], - "box13": [977,296,102,155], - "box14": [1079,296,114,155], - "box15": [1192,296,93,155], + 0: [22,1575,48,48], + 1: [71,1575,47,48], + 2: [118,1575,46,48], + 3: [165,1575,46,48], + 4: [211,1575,48,48], + 5: [259,1575,47,48], + 6: [306,1575,48,48], + 7: [354,1575,47,48], + 8: [401,1575,46,48], + 9: [447,1575,47,48], + 10: [494,1575,49,49], + 11: [543,1575,47,49], + 12: [590,1575,47,49], + 13: [637,1575,48,49], + 14: [685,1575,46,48], + 15: [731,1575,48,48], + 16: [779,1575,47,48], + 17: [826,1575,48,48], + 18: [873,1575,46,48], + 19: [920,1575,48,48], + 20: [968,1575,46,49], + 21: [1014,1575,48,49], + 22: [1062,1575,47,49], + 23: [1109,1575,48,49], + 24: [1157,1575,46,49], + 25: [1203,1577,49,47], + 26: [1203,1530,49,47], + 27: [1203,1434,49,47], + 29: [1203,1388,49,46], + 30: [1203,1340,49,48], + 31: [1203,1292,49,48], + 32: [1203,1244,49,48], + 33: [1203,1198,49,46], + 34: [1203,1151,49,47], + 35: [1203,1104,49,47], + 36: [1203,1057,49,46], + 37: [1203,1010,49,47], + 38: [1203,960,49,50], + 39: [1203,914,47,46], + 40: [1203,865,47,48], + 41: [1203,819,47,46], + 42: [1203,774,51,45], + 43: [1203,724,51,50], + 44: [1203,676,51,48], + 45: [1203,630,47,46], + Scotland: [450,278,111,118], + France: [890,1430,109,114], + Calais: [1134,1418,67,79], + Ireland: [50,949,110,121], + Burgundy: [996,688,110,121], + Bamburgh: [637,300,60,45], + Carlisle: [436,422,81,63], + Hexham: [561,395,53,47], + Appleby: [546,465,57,52], + Newcastle: [656,419,70,77], + Scarborough: [791,532,78,57], + York: [691,623,76,65], + Lancaster: [476,595,70,51], + Ravenspur: [835,721,72,45], + Lincoln: [767,760,78,64], + Chester: [433,797,78,64], + Derby: [656,845,62,49], + Nottingham: [718,845,73,40], + Lichfield: [613,906,74,61], + Truro: [142,1445,56,53], + Launceston: [201,1354,68,60], + Exeter: [342,1376,64,66], + Dorchester: [524,1368,58,49], + Southampton: [677,1371,60,48], + Arundel: [794,1334,56,48], + Hastings: [983,1322,55,46], + Dover: [1041,1287,53,41], + Canterbury: [1059,1203,66,65], + Rochester: [983,1185,65,68], + London: [874,1164,94,72], + Guildford: [841,1249,74,59], + Winchester: [722,1262,71,60], + Salisbury: [610,1268,73,66], + Wells: [504,1262,68,66], + Bristol: [498,1185,63,58], + Newbury: [665,1194,66,44], + Oxford: [707,1101,70,63], + St Albans: [901,1092,54,40], + Cambridge: [901,1021,54,45], + Bedford: [836,1044,65,48], + Northampton: [748,1013,64,54], + Gloucester: [564,1092,68,62], + Hereford: [476,1040,71,65], + Cardiff: [392,1164,65,65], + Pembroke: [185,1127,58,37], + Ipswich: [1100,1030,58,43], + Bury St Edmunds: [997,995,54,45], + Norwich: [1059,890,67,62], + Lynn: [962,895,47,38], + Ely: [921,952,65,66], + Peterborough: [828,930,66,62], + Leicester: [758,906,49,46], + Coventry: [675,967,67,63], + Worcester: [556,992,72,64], + Ludlow: [476,976,54,34], + Shrewsbury: [500,865,78,69], + Harlech: [278,912,67,61], + Plymouth: [253,1417,58,50], + Irish Sea: [233,667,160,93], + English Channel: [564,1461,173,69], + North Sea: [1106,749,97,117], + box16: [1247,258,65,155], + box1: [200,34,103,163], + box2: [303,34,103,163], + box3: [406,34,99,163], + box4: [506,34,103,163], + box5: [608,34,104,163], + box6: [735,34,102,163], + box7: [837,34,102,163], + box8: [939,34,102,163], + box9: [1041,34,99,163], + box10: [1140,34,102,163], + box11: [735,258,107,155], + box12: [842,258,97,155], + box13: [939,258,102,155], + box14: [1041,258,114,155], + box15: [1154,258,93,155], } - let data = [] function print(str) { data.push(str) |