diff --git a/src/apps/MapApplication.java b/src/apps/MapApplication.java index 05acbd0..f38986c 100644 --- a/src/apps/MapApplication.java +++ b/src/apps/MapApplication.java @@ -115,7 +115,7 @@ public abstract class MapApplication extends Application { private static final KeyCombination CTRL_ENTER = new KeyCodeCombination(KeyCode.ENTER, KeyCodeCombination.CONTROL_DOWN); - public static final Projection[] FEATURED_PROJECTIONS = { Arbitrary.DANSEIJI_O, Arbitrary.DANSEIJI_I, Arbitrary.DANSEIJI_II, Arbitrary.DANSEIJI_III, Arbitrary.DANSEIJI_IV, Cylindrical.MERCATOR, + public static final Projection[] FEATURED_PROJECTIONS = { Arbitrary.DANSEIJI_III, Arbitrary.DANSEIJI_IV, Cylindrical.MERCATOR, Cylindrical.EQUIRECTANGULAR, Cylindrical.EQUAL_AREA, Cylindrical.GALL_STEREOGRAPHIC, Azimuthal.STEREOGRAPHIC, Azimuthal.POLAR, Azimuthal.EQUAL_AREA, Azimuthal.GNOMONIC, Azimuthal.PERSPECTIVE, Conic.LAMBERT, Conic.EQUIDISTANT, Conic.ALBERS, @@ -555,7 +555,11 @@ public abstract class MapApplication extends Application { protected void loadParameters() { - getProjection().setParameters(currentParams); + try { + getProjection().setParameters(currentParams); + } catch (IllegalArgumentException e) { + showError("Failed to load projection", e.getLocalizedMessage()); + } } diff --git a/src/data/danseijiIII.csv b/src/data/danseijiIII.csv index da6d680..0f98d50 100644 --- a/src/data/danseijiIII.csv +++ b/src/data/danseijiIII.csv @@ -1,1300 +1,1264 @@ -650,18,36,5.213010,3.767632, --0.083131,1.149570, -0.361707,1.244602, -0.356134,1.266468, --0.415714,1.370342, --0.428154,1.350245, --0.436461,1.327083, --0.440485,1.301462, --0.440207,1.274011, --0.435721,1.245499, --0.427243,1.216473, --0.415015,1.187547, --0.399404,1.159081, --0.380813,1.131528, --0.359887,1.105098, --0.335684,1.079928, --0.309000,1.056426, --0.280073,1.034906, --0.249121,1.015635, --0.215450,0.999060, --0.178506,0.985396, --0.139527,0.974564, --0.099378,0.966885, --0.058968,0.962766, --0.018072,0.962312, -0.022771,0.965460, -0.063016,0.972058, -0.102090,0.981904, -0.139828,0.994676, -0.175785,1.010133, -0.209602,1.028000, -0.240603,1.048032, -0.269204,1.069907, -0.294745,1.093359, -0.316851,1.118071, -0.335060,1.143688, -0.348926,1.169760, -0.358094,1.195703, -0.362360,1.220848, -0.599862,1.305656, -0.588561,1.360057, --0.601074,1.520091, --0.629274,1.471427, --0.647720,1.418181, --0.657105,1.362619, --0.658502,1.306464, --0.652404,1.250756, --0.639175,1.196233, --0.619301,1.143631, --0.593423,1.093444, --0.562232,1.046171, --0.525913,1.002280, --0.485463,0.962254, --0.441355,0.925869, --0.393942,0.892801, --0.344227,0.863604, --0.293189,0.837946, --0.241191,0.816005, --0.188437,0.798834, --0.133356,0.786625, --0.075723,0.780198, --0.016069,0.780083, -0.044559,0.785764, -0.105259,0.796599, -0.165293,0.812250, -0.224007,0.832492, -0.280837,0.857122, -0.335183,0.885995, -0.386427,0.919024, -0.433879,0.955987, -0.476894,0.996792, -0.514634,1.041334, -0.546430,1.089369, -0.571657,1.140498, -0.589653,1.194184, -0.599625,1.249689, -0.810138,1.321766, -0.808005,1.401023, --0.782461,1.627086, --0.814837,1.552049, --0.838943,1.473811, --0.853906,1.393999, --0.858140,1.313692, --0.850796,1.234234, --0.832467,1.156750, --0.804495,1.082280, --0.768064,1.011708, --0.724183,0.945792, --0.673981,0.885138, --0.618024,0.830636, --0.558669,0.783626, --0.498197,0.741529, --0.439634,0.704620, --0.382429,0.671649, --0.322487,0.642142, --0.254952,0.618724, --0.180254,0.603897, --0.101635,0.596950, --0.021583,0.597558, -0.058770,0.605408, -0.138839,0.620057, -0.218135,0.641141, -0.296132,0.668369, -0.372223,0.701506, -0.445654,0.740353, -0.515496,0.784783, -0.580677,0.834770, -0.639897,0.890312, -0.691728,0.951381, -0.734597,1.017911, -0.767742,1.089445, -0.790913,1.164954, -0.804468,1.242800, -1.045168,1.291321, -1.063737,1.381826, --1.002019,1.703159, --1.023020,1.607672, --1.039539,1.510597, --1.051369,1.410688, --1.053889,1.307710, --1.042016,1.204587, --1.016115,1.104737, --0.978431,1.009520, --0.930604,0.919929, --0.873762,0.836825, --0.808592,0.760735, --0.737445,0.692099, --0.666256,0.632878, --0.602725,0.584118, --0.545865,0.541538, --0.486099,0.502977, --0.410714,0.469218, --0.319683,0.441302, --0.222878,0.423520, --0.124660,0.415418, --0.026083,0.416290, -0.072289,0.425918, -0.169943,0.444023, -0.266491,0.470231, -0.361666,0.504075, -0.455032,0.545053, -0.545981,0.592777, -0.633482,0.647030, -0.716011,0.707998, -0.791827,0.776134, -0.858929,0.851960, -0.914999,0.935595, -0.958561,1.024527, -0.992381,1.114982, -1.021421,1.203602, -1.322836,1.177369, -1.371148,1.266610, --1.291334,1.725308, --1.285867,1.617395, --1.274803,1.510429, --1.261560,1.400383, --1.248586,1.282226, --1.226423,1.159701, --1.190991,1.040072, --1.142897,0.926607, --1.083414,0.820073, --1.013418,0.721407, --0.935300,0.631988, --0.855355,0.553446, --0.780906,0.485727, --0.716687,0.427788, --0.655617,0.376395, --0.581699,0.331561, --0.482921,0.294108, --0.371006,0.264747, --0.256524,0.245071, --0.141510,0.235671, --0.026585,0.236556, -0.087563,0.247584, -0.200418,0.268703, -0.311812,0.299548, -0.421548,0.339519, -0.529844,0.387811, -0.636376,0.443434, -0.740364,0.505971, -0.840111,0.575522, -0.932564,0.653347, -1.015143,0.740823, -1.087191,0.835527, -1.151085,0.929571, -1.211048,1.014437, -1.269165,1.094273, -1.578125,1.004444, -1.650685,1.096551, --1.582438,1.695391, --1.554101,1.574617, --1.518654,1.458993, --1.478259,1.346918, --1.440751,1.228697, --1.404473,1.097476, --1.358186,0.963501, --1.299402,0.834670, --1.228734,0.713971, --1.147341,0.602327, --1.059384,0.501690, --0.974458,0.415975, --0.896772,0.343419, --0.822685,0.276114, --0.749021,0.211863, --0.655437,0.158448, --0.535916,0.117653, --0.409236,0.087214, --0.281413,0.066774, --0.152405,0.057183, --0.022997,0.058460, -0.105563,0.070477, -0.231886,0.093715, -0.355428,0.128812, -0.477319,0.174464, -0.597184,0.229043, -0.716281,0.292111, -0.834984,0.361575, -0.951356,0.436959, -1.061854,0.520606, -1.160340,0.612099, -1.247988,0.703179, -1.334153,0.781114, -1.420554,0.848604, -1.501645,0.921971, -1.790059,0.801012, -1.885471,0.888911, --1.849497,1.616471, --1.795612,1.490006, --1.739462,1.367637, --1.683390,1.250076, --1.628161,1.134922, --1.575632,1.010878, --1.518222,0.873818, --1.449562,0.735086, --1.369857,0.603027, --1.280214,0.482027, --1.182439,0.373709, --1.079898,0.276315, --0.983653,0.190015, --0.899476,0.114220, --0.817814,0.042937, --0.710705,-0.016262, --0.577326,-0.059496, --0.440348,-0.091293, --0.301128,-0.111421, --0.159647,-0.119757, --0.016802,-0.117152, -0.125959,-0.104186, -0.266570,-0.079783, -0.401606,-0.042370, -0.529540,0.008044, -0.658720,0.068116, -0.785934,0.138079, -0.914842,0.213404, -1.046427,0.291146, -1.173474,0.372834, -1.291304,0.452833, -1.397061,0.521513, -1.497790,0.582138, -1.596553,0.646996, -1.693891,0.720366, -1.961657,0.574421, -2.075776,0.650156, --2.088990,1.493034, --2.010355,1.370267, --1.935956,1.247698, --1.865820,1.125629, --1.798078,1.005028, --1.732775,0.884623, --1.666212,0.757714, --1.591664,0.621700, --1.508295,0.484365, --1.411161,0.357335, --1.299380,0.243127, --1.181362,0.137198, --1.062885,0.038214, --0.954607,-0.052885, --0.862015,-0.132685, --0.753773,-0.193636, --0.614881,-0.237245, --0.468380,-0.269871, --0.318208,-0.288644, --0.165162,-0.294310, --0.010090,-0.289339, -0.145681,-0.275184, -0.300769,-0.250786, -0.446475,-0.212745, -0.577966,-0.157894, -0.715221,-0.094097, -0.845067,-0.018432, -0.978146,0.060346, -1.117385,0.135997, -1.255607,0.206967, -1.390628,0.267631, -1.518600,0.312879, -1.635909,0.365126, -1.743477,0.431089, -1.850809,0.501885, -2.092725,0.327392, -2.219223,0.383904, --2.297652,1.333672, --2.199518,1.220506, --2.109113,1.103291, --2.025106,0.982299, --1.945824,0.858650, --1.869416,0.733114, --1.793651,0.606674, --1.716674,0.477111, --1.635248,0.342418, --1.529237,0.219841, --1.407683,0.106892, --1.282097,-0.001335, --1.154180,-0.105566, --1.025532,-0.205873, --0.902277,-0.300450, --0.786951,-0.372968, --0.647038,-0.415922, --0.492824,-0.448024, --0.331993,-0.464024, --0.168148,-0.465870, --0.004030,-0.458148, -0.160808,-0.443037, -0.324552,-0.420057, -0.475112,-0.380228, -0.611740,-0.319708, -0.751038,-0.254464, -0.883886,-0.177364, -1.018168,-0.097421, -1.161498,-0.027368, -1.306699,0.032996, -1.447326,0.079072, -1.591902,0.112801, -1.733880,0.152610, -1.857469,0.207739, -1.973024,0.269030, -2.176533,0.063790, -2.309580,0.096307, --2.472566,1.147499, --2.359640,1.049166, --2.257022,0.940880, --2.162611,0.824570, --2.074686,0.702059, --1.990929,0.575369, --1.909355,0.446720, --1.829583,0.317160, --1.745586,0.186929, --1.633599,0.070360, --1.505632,-0.036261, --1.375124,-0.142417, --1.243525,-0.247535, --1.109429,-0.350246, --0.971984,-0.449784, --0.826897,-0.536873, --0.667491,-0.591445, --0.502864,-0.625380, --0.334311,-0.637389, --0.164993,-0.634919, -0.002831,-0.625228, -0.169395,-0.609174, -0.333365,-0.586994, -0.485474,-0.543635, -0.628443,-0.477821, -0.769883,-0.408653, -0.908411,-0.333513, -1.046494,-0.257689, -1.189180,-0.192913, -1.332186,-0.142067, -1.478761,-0.103757, -1.630905,-0.073367, -1.783362,-0.046450, -1.923369,-0.015414, -2.049396,0.025510, -2.204897,-0.203808, -2.335278,-0.201777, --2.611222,0.943225, --2.490268,0.862601, --2.380621,0.765759, --2.280329,0.656344, --2.187469,0.537433, --2.099534,0.412004, --2.014285,0.282540, --1.928917,0.151423, --1.837303,0.022882, --1.723391,-0.088228, --1.592974,-0.185417, --1.461438,-0.285787, --1.329905,-0.388789, --1.195455,-0.490663, --1.051573,-0.589655, --0.878340,-0.680764, --0.684727,-0.750628, --0.494355,-0.796658, --0.320108,-0.809389, --0.152700,-0.802895, -0.013378,-0.791687, -0.177915,-0.775702, -0.340023,-0.751994, -0.495504,-0.701600, -0.643389,-0.629558, -0.788296,-0.556838, -0.928420,-0.485956, -1.062504,-0.415861, -1.199852,-0.355832, -1.348329,-0.314087, -1.499071,-0.281284, -1.649422,-0.256920, -1.799258,-0.243677, -1.943684,-0.234807, -2.077119,-0.217859, -2.173513,-0.476249, -2.295626,-0.495062, --2.714512,0.729266, --2.592469,0.667124, --2.481627,0.582487, --2.380210,0.481062, --2.285873,0.367321, --2.195829,0.244539, --2.106698,0.115471, --2.014251,-0.016371, --1.913474,-0.144879, --1.797689,-0.250420, --1.671110,-0.337991, --1.544668,-0.429932, --1.417904,-0.527199, --1.283329,-0.625974, --1.119520,-0.724019, --0.914474,-0.817343, --0.698012,-0.895075, --0.483857,-0.954129, --0.295686,-0.977059, --0.130981,-0.970800, -0.029940,-0.957308, -0.190721,-0.939792, -0.353183,-0.908254, -0.512004,-0.847007, -0.662922,-0.770815, -0.809259,-0.697640, -0.951929,-0.631362, -1.089079,-0.570039, -1.225845,-0.519451, -1.367688,-0.484206, -1.509297,-0.456942, -1.650625,-0.439635, -1.791638,-0.435424, -1.928459,-0.440607, -2.052998,-0.455645, -2.090350,-0.709486, -2.193872,-0.756508, --2.785369,0.517893, --2.669827,0.470496, --2.563897,0.396743, --2.465699,0.303903, --2.372956,0.196537, --2.282295,0.078143, --2.189453,-0.048409, --2.090277,-0.179746, --1.982376,-0.306328, --1.866545,-0.406648, --1.748208,-0.487694, --1.630264,-0.571374, --1.506436,-0.661101, --1.357337,-0.756152, --1.159290,-0.855782, --0.935093,-0.949305, --0.704305,-1.030032, --0.472928,-1.096850, --0.267161,-1.132926, --0.091790,-1.134524, -0.064054,-1.118789, -0.226955,-1.090416, -0.390965,-1.042253, -0.545994,-0.972963, -0.691454,-0.898627, -0.833233,-0.829246, -0.973327,-0.768559, -1.111445,-0.718513, -1.247018,-0.681131, -1.379872,-0.653796, -1.509922,-0.633294, -1.636949,-0.622062, -1.760468,-0.625838, -1.875196,-0.642525, -1.982017,-0.671437, -1.954703,-0.916501, -2.025334,-0.976392, --2.834297,0.319650, --2.731345,0.281167, --2.635198,0.216923, --2.544693,0.133329, --2.456189,0.034683, --2.365614,-0.076862, --2.269265,-0.199203, --2.164348,-0.328396, --2.051780,-0.452408, --1.938516,-0.552279, --1.828680,-0.630044, --1.715245,-0.706940, --1.580757,-0.790698, --1.400884,-0.884123, --1.184058,-0.981690, --0.949188,-1.073606, --0.700834,-1.156104, --0.444426,-1.225410, --0.186484,-1.276413, --0.002764,-1.280815, -0.196205,-1.262560, -0.350284,-1.212403, -0.486249,-1.150048, -0.614526,-1.081509, -0.739050,-1.013023, -0.862707,-0.951571, -0.987219,-0.900720, -1.111172,-0.862760, -1.233483,-0.837255, -1.353210,-0.821574, -1.469451,-0.812808, -1.579917,-0.811845, -1.681542,-0.824238, -1.777477,-0.843719, -1.871446,-0.871872, -1.749724,-1.123329, -1.800164,-1.172914, --2.877732,0.138224, --2.795345,0.109374, --2.716263,0.059155, --2.636385,-0.010045, --2.552250,-0.096027, --2.461247,-0.197900, --2.360792,-0.314997, --2.249375,-0.444194, --2.131620,-0.572409, --2.016452,-0.681151, --1.909640,-0.761031, --1.790370,-0.834514, --1.637421,-0.912186, --1.441653,-0.999798, --1.217542,-1.092207, --0.968214,-1.185215, --0.709181,-1.267482, --0.428112,-1.336448, --0.099001,-1.380054, -0.396305,-1.422338, -0.478129,-1.358931, -0.560457,-1.295159, -0.642909,-1.231616, -0.728217,-1.172129, -0.817321,-1.118523, -0.909917,-1.072446, -1.003911,-1.035852, -1.098397,-1.009280, -1.192717,-0.994192, -1.285671,-0.989890, -1.375668,-0.994138, -1.460649,-1.007014, -1.540972,-1.026715, -1.617547,-1.052292, -1.687860,-1.083998, -1.537812,-1.300045, -1.566662,-1.343442, -1.477270,-1.601341, -1.455136,-1.656184, -1.425208,-1.706764, -1.388502,-1.752265, -1.345248,-1.791048, -1.296237,-1.822299, -1.242757,-1.844787, -1.186365,-1.859103, -1.128282,-1.865315, -1.070340,-1.861844, -1.013626,-1.849396, -0.958966,-1.828835, -0.908165,-1.799836, -0.861898,-1.763092, -0.820846,-1.720113, -0.786134,-1.671111, -0.757158,-1.618412, -0.734025,-1.563365, -0.719466,-1.508198, -0.729935,-1.457834, -0.738535,-1.407561, -0.768676,-1.359468, -0.811192,-1.314449, -0.861300,-1.273031, -0.917244,-1.236510, -0.977333,-1.206158, -1.040561,-1.183082, -1.105381,-1.167789, -1.170323,-1.159903, -1.234290,-1.159340, -1.296097,-1.166561, -1.354696,-1.181147, -1.409109,-1.202236, -1.458024,-1.229472, -1.500996,-1.262302, -1.337739,-1.420256, -1.348039,-1.445972, -1.304812,-1.550871, -1.294492,-1.579061, -1.279490,-1.605227, -1.260348,-1.628626, -1.237739,-1.648727, -1.212300,-1.664997, -1.184580,-1.677144, -1.155322,-1.684657, -1.125268,-1.687265, -1.095214,-1.685194, -1.065752,-1.678556, -1.037755,-1.667617, -1.011613,-1.652929, -0.987985,-1.634910, -0.967376,-1.613752, -0.950420,-1.590139, -0.937938,-1.564366, -0.930798,-1.537287, -0.929480,-1.509511, -0.931963,-1.481145, -0.941611,-1.453560, -0.955163,-1.427621, -0.973803,-1.403576, -0.997211,-1.382284, -1.024576,-1.364130, -1.054908,-1.349525, -1.087259,-1.338650, -1.120836,-1.331699, -1.154836,-1.328902, -1.188351,-1.330300, -1.220658,-1.335762, -1.251014,-1.345269, -1.278605,-1.358746, -1.302719,-1.376042, -1.322568,-1.396690, -1.129478,-1.504655, -1.643347,-1.657854, -1.611025,-1.738269, -1.567459,-1.812693, -1.513275,-1.878827, -1.448839,-1.934902, -1.377170,-1.979103, -1.298789,-2.012148, -1.216612,-2.033254, -1.133214,-2.042325, -1.048123,-2.038397, -0.964799,-2.020338, -0.885604,-1.989448, -0.811615,-1.946275, -0.743618,-1.894717, -0.683460,-1.833204, -0.635046,-1.762146, -0.591396,-1.685717, -0.555385,-1.603488, -0.510816,-1.515426, -0,0,1,2, -0,0,3,4, -0,0,4,5, -0,0,5,6, -0,0,6,7, -0,0,7,8, -0,0,8,9, -0,0,9,10, -0,0,10,11, -0,0,11,12, -0,0,12,13, -0,0,13,14, -0,0,14,15, -0,0,15,16, -0,0,16,17, -0,0,17,18, -0,0,18,19, -0,0,19,20, -0,0,20,21, -0,0,21,22, -0,0,22,23, -0,0,23,24, -0,0,24,25, -0,0,25,26, -0,0,26,27, -0,0,27,28, -0,0,28,29, -0,0,29,30, -0,0,30,31, -0,0,31,32, -0,0,32,33, -0,0,33,34, -0,0,34,35, -0,0,35,36, -0,0,36,37, -0,0,37,1, -2,1,38,39, -4,3,40,41, -5,4,41,42, -6,5,42,43, -7,6,43,44, -8,7,44,45, -9,8,45,46, -10,9,46,47, -11,10,47,48, -12,11,48,49, -13,12,49,50, -14,13,50,51, -15,14,51,52, -16,15,52,53, -17,16,53,54, -18,17,54,55, -19,18,55,56, -20,19,56,57, -21,20,57,58, -22,21,58,59, -23,22,59,60, -24,23,60,61, -25,24,61,62, -26,25,62,63, -27,26,63,64, -28,27,64,65, -29,28,65,66, -30,29,66,67, -31,30,67,68, -32,31,68,69, -33,32,69,70, -34,33,70,71, -35,34,71,72, -36,35,72,73, -37,36,73,74, -1,37,74,38, -39,38,75,76, -41,40,77,78, -42,41,78,79, -43,42,79,80, -44,43,80,81, -45,44,81,82, -46,45,82,83, -47,46,83,84, -48,47,84,85, -49,48,85,86, -50,49,86,87, -51,50,87,88, -52,51,88,89, -53,52,89,90, -54,53,90,91, -55,54,91,92, -56,55,92,93, -57,56,93,94, -58,57,94,95, -59,58,95,96, -60,59,96,97, -61,60,97,98, -62,61,98,99, -63,62,99,100, -64,63,100,101, -65,64,101,102, -66,65,102,103, -67,66,103,104, -68,67,104,105, -69,68,105,106, -70,69,106,107, -71,70,107,108, -72,71,108,109, -73,72,109,110, -74,73,110,111, -38,74,111,75, -76,75,112,113, -78,77,114,115, -79,78,115,116, -80,79,116,117, -81,80,117,118, -82,81,118,119, -83,82,119,120, -84,83,120,121, -85,84,121,122, -86,85,122,123, -87,86,123,124, -88,87,124,125, -89,88,125,126, -90,89,126,127, -91,90,127,128, -92,91,128,129, -93,92,129,130, -94,93,130,131, -95,94,131,132, -96,95,132,133, -97,96,133,134, -98,97,134,135, -99,98,135,136, -100,99,136,137, -101,100,137,138, -102,101,138,139, -103,102,139,140, -104,103,140,141, -105,104,141,142, -106,105,142,143, -107,106,143,144, -108,107,144,145, -109,108,145,146, -110,109,146,147, -111,110,147,148, -75,111,148,112, -113,112,149,150, -115,114,151,152, -116,115,152,153, -117,116,153,154, -118,117,154,155, -119,118,155,156, -120,119,156,157, -121,120,157,158, -122,121,158,159, -123,122,159,160, -124,123,160,161, -125,124,161,162, -126,125,162,163, -127,126,163,164, -128,127,164,165, -129,128,165,166, -130,129,166,167, -131,130,167,168, -132,131,168,169, -133,132,169,170, -134,133,170,171, -135,134,171,172, -136,135,172,173, -137,136,173,174, -138,137,174,175, -139,138,175,176, -140,139,176,177, -141,140,177,178, -142,141,178,179, -143,142,179,180, -144,143,180,181, -145,144,181,182, -146,145,182,183, -147,146,183,184, -148,147,184,185, -112,148,185,149, -150,149,186,187, -152,151,188,189, -153,152,189,190, -154,153,190,191, -155,154,191,192, -156,155,192,193, -157,156,193,194, -158,157,194,195, -159,158,195,196, -160,159,196,197, -161,160,197,198, -162,161,198,199, -163,162,199,200, -164,163,200,201, -165,164,201,202, -166,165,202,203, -167,166,203,204, -168,167,204,205, -169,168,205,206, -170,169,206,207, -171,170,207,208, -172,171,208,209, -173,172,209,210, -174,173,210,211, -175,174,211,212, -176,175,212,213, -177,176,213,214, -178,177,214,215, -179,178,215,216, -180,179,216,217, -181,180,217,218, -182,181,218,219, -183,182,219,220, -184,183,220,221, -185,184,221,222, -149,185,222,186, -187,186,223,224, -189,188,225,226, -190,189,226,227, -191,190,227,228, -192,191,228,229, -193,192,229,230, -194,193,230,231, -195,194,231,232, -196,195,232,233, -197,196,233,234, -198,197,234,235, -199,198,235,236, -200,199,236,237, -201,200,237,238, -202,201,238,239, -203,202,239,240, -204,203,240,241, -205,204,241,242, -206,205,242,243, -207,206,243,244, -208,207,244,245, -209,208,245,246, -210,209,246,247, -211,210,247,248, -212,211,248,249, -213,212,249,250, -214,213,250,251, -215,214,251,252, -216,215,252,253, -217,216,253,254, -218,217,254,255, -219,218,255,256, -220,219,256,257, -221,220,257,258, -222,221,258,259, -186,222,259,223, -224,223,260,261, -226,225,262,263, -227,226,263,264, -228,227,264,265, -229,228,265,266, -230,229,266,267, -231,230,267,268, -232,231,268,269, -233,232,269,270, -234,233,270,271, -235,234,271,272, -236,235,272,273, -237,236,273,274, -238,237,274,275, -239,238,275,276, -240,239,276,277, -241,240,277,278, -242,241,278,279, -243,242,279,280, -244,243,280,281, -245,244,281,282, -246,245,282,283, -247,246,283,284, -248,247,284,285, -249,248,285,286, -250,249,286,287, -251,250,287,288, -252,251,288,289, -253,252,289,290, -254,253,290,291, -255,254,291,292, -256,255,292,293, -257,256,293,294, -258,257,294,295, -259,258,295,296, -223,259,296,260, -261,260,297,298, -263,262,299,300, -264,263,300,301, -265,264,301,302, -266,265,302,303, -267,266,303,304, -268,267,304,305, -269,268,305,306, -270,269,306,307, -271,270,307,308, -272,271,308,309, -273,272,309,310, -274,273,310,311, -275,274,311,312, -276,275,312,313, -277,276,313,314, -278,277,314,315, -279,278,315,316, -280,279,316,317, -281,280,317,318, -282,281,318,319, -283,282,319,320, -284,283,320,321, -285,284,321,322, -286,285,322,323, -287,286,323,324, -288,287,324,325, -289,288,325,326, -290,289,326,327, -291,290,327,328, -292,291,328,329, -293,292,329,330, -294,293,330,331, -295,294,331,332, -296,295,332,333, -260,296,333,297, -298,297,334,335, -300,299,336,337, -301,300,337,338, -302,301,338,339, -303,302,339,340, -304,303,340,341, -305,304,341,342, -306,305,342,343, -307,306,343,344, -308,307,344,345, -309,308,345,346, -310,309,346,347, -311,310,347,348, -312,311,348,349, -313,312,349,350, -314,313,350,351, -315,314,351,352, -316,315,352,353, -317,316,353,354, -318,317,354,355, -319,318,355,356, -320,319,356,357, -321,320,357,358, -322,321,358,359, -323,322,359,360, -324,323,360,361, -325,324,361,362, -326,325,362,363, -327,326,363,364, -328,327,364,365, -329,328,365,366, -330,329,366,367, -331,330,367,368, -332,331,368,369, -333,332,369,370, -297,333,370,334, -335,334,371,372, -337,336,373,374, -338,337,374,375, -339,338,375,376, -340,339,376,377, -341,340,377,378, -342,341,378,379, -343,342,379,380, -344,343,380,381, -345,344,381,382, -346,345,382,383, -347,346,383,384, -348,347,384,385, -349,348,385,386, -350,349,386,387, -351,350,387,388, -352,351,388,389, -353,352,389,390, -354,353,390,391, -355,354,391,392, -356,355,392,393, -357,356,393,394, -358,357,394,395, -359,358,395,396, -360,359,396,397, -361,360,397,398, -362,361,398,399, -363,362,399,400, -364,363,400,401, -365,364,401,402, -366,365,402,403, -367,366,403,404, -368,367,404,405, -369,368,405,406, -370,369,406,407, -334,370,407,371, -372,371,408,409, -374,373,410,411, -375,374,411,412, -376,375,412,413, -377,376,413,414, -378,377,414,415, -379,378,415,416, -380,379,416,417, -381,380,417,418, -382,381,418,419, -383,382,419,420, -384,383,420,421, -385,384,421,422, -386,385,422,423, -387,386,423,424, -388,387,424,425, -389,388,425,426, -390,389,426,427, -391,390,427,428, -392,391,428,429, -393,392,429,430, -394,393,430,431, -395,394,431,432, -396,395,432,433, -397,396,433,434, -398,397,434,435, -399,398,435,436, -400,399,436,437, -401,400,437,438, -402,401,438,439, -403,402,439,440, -404,403,440,441, -405,404,441,442, -406,405,442,443, -407,406,443,444, -371,407,444,408, -409,408,445,446, -411,410,447,448, -412,411,448,449, -413,412,449,450, -414,413,450,451, -415,414,451,452, -416,415,452,453, -417,416,453,454, -418,417,454,455, -419,418,455,456, -420,419,456,457, -421,420,457,458, -422,421,458,459, -423,422,459,460, -424,423,460,461, -425,424,461,462, -426,425,462,463, -427,426,463,464, -428,427,464,465, -429,428,465,466, -430,429,466,467, -431,430,467,468, -432,431,468,469, -433,432,469,470, -434,433,470,471, -435,434,471,472, -436,435,472,473, -437,436,473,474, -438,437,474,475, -439,438,475,476, -440,439,476,477, -441,440,477,478, -442,441,478,479, -443,442,479,480, -444,443,480,481, -408,444,481,445, -446,445,482,483, -448,447,484,485, -449,448,485,486, -450,449,486,487, -451,450,487,488, -452,451,488,489, -453,452,489,490, -454,453,490,491, -455,454,491,492, -456,455,492,493, -457,456,493,494, -458,457,494,495, -459,458,495,496, -460,459,496,497, -461,460,497,498, -462,461,498,499, -463,462,499,500, -464,463,500,501, -465,464,501,502, -466,465,502,503, -467,466,503,504, -468,467,504,505, -469,468,505,506, -470,469,506,507, -471,470,507,508, -472,471,508,509, -473,472,509,510, -474,473,510,511, -475,474,511,512, -476,475,512,513, -477,476,513,514, -478,477,514,515, -479,478,515,516, -480,479,516,517, -481,480,517,518, -445,481,518,482, -483,482,519,520, -485,484,521,522, -486,485,522,523, -487,486,523,524, -488,487,524,525, -489,488,525,526, -490,489,526,527, -491,490,527,528, -492,491,528,529, -493,492,529,530, -494,493,530,531, -495,494,531,532, -496,495,532,533, -497,496,533,534, -498,497,534,535, -499,498,535,536, -500,499,536,537, -501,500,537,538, -502,501,538,539, -503,502,539,540, -504,503,540,541, -505,504,541,542, -506,505,542,543, -507,506,543,544, -508,507,544,545, -509,508,545,546, -510,509,546,547, -511,510,547,548, -512,511,548,549, -513,512,549,550, -514,513,550,551, -515,514,551,552, -516,515,552,553, -517,516,553,554, -518,517,554,555, -482,518,555,519, -520,519,556,557, -632,631,558,559, -633,632,559,560, -634,633,560,561, -635,634,561,562, -636,635,562,563, -637,636,563,564, -638,637,564,565, -639,638,565,566, -640,639,566,567, -641,640,567,568, -642,641,568,569, -643,642,569,570, -644,643,570,571, -645,644,571,572, -646,645,572,573, -647,646,573,574, -648,647,574,575, -649,648,575,576, -540,649,576,577, -541,540,577,578, -542,541,578,579, -543,542,579,580, -544,543,580,581, -545,544,581,582, -546,545,582,583, -547,546,583,584, -548,547,584,585, -549,548,585,586, -550,549,586,587, -551,550,587,588, -552,551,588,589, -553,552,589,590, -554,553,590,591, -555,554,591,592, -519,555,592,556, -557,556,593,594, -559,558,595,596, -560,559,596,597, -561,560,597,598, -562,561,598,599, -563,562,599,600, -564,563,600,601, -565,564,601,602, -566,565,602,603, -567,566,603,604, -568,567,604,605, -569,568,605,606, -570,569,606,607, -571,570,607,608, -572,571,608,609, -573,572,609,610, -574,573,610,611, -575,574,611,612, -576,575,612,613, -577,576,613,614, -578,577,614,615, -579,578,615,616, -580,579,616,617, -581,580,617,618, -582,581,618,619, -583,582,619,620, -584,583,620,621, -585,584,621,622, -586,585,622,623, -587,586,623,624, -588,587,624,625, -589,588,625,626, -590,589,626,627, -591,590,627,628, -592,591,628,629, -556,592,629,593, -594,593,630,630, -596,595,630,630, -597,596,630,630, -598,597,630,630, -599,598,630,630, -600,599,630,630, -601,600,630,630, -602,601,630,630, -603,602,630,630, -604,603,630,630, -605,604,630,630, -606,605,630,630, -607,606,630,630, -608,607,630,630, -609,608,630,630, -610,609,630,630, -611,610,630,630, -612,611,630,630, -613,612,630,630, -614,613,630,630, -615,614,630,630, -616,615,630,630, -617,616,630,630, -618,617,630,630, -619,618,630,630, -620,619,630,630, -621,620,630,630, -622,621,630,630, -623,622,630,630, -624,623,630,630, -625,624,630,630, -626,625,630,630, -627,626,630,630, -628,627,630,630, -629,628,630,630, -593,629,630,630, -0,3,40,77,114,151,188,225,262,299,336,373,410,447,484,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,649,648,647,646,645,644,643,642,641,640,639,638,637,636,635,634,633,632,631,558,595,630,594,557,520,483,446,409,372,335,298,261,224,187,150,113,76,39,2, +127,8,16,28,28,35,4.403638,3.983156, +-0.807109,0.677108, +-1.459168,0.388984, +-1.380210,0.288705, +-1.278147,0.207486, +-1.159230,0.155711, +-1.029027,0.138118, +-0.897173,0.158009, +-0.765517,0.201490, +-0.648452,0.282475, +-0.534854,0.374724, +-0.439117,0.493799, +-0.351579,0.619666, +-0.294805,0.759768, +-0.255622,0.898919, +-0.252150,1.036056, +-0.282605,1.157134, +-0.354788,1.257696, +-0.457399,1.335039, +-1.881646,0.101465, +-1.698484,-0.067472, +-1.506856,-0.205282, +-1.277235,-0.293307, +-1.042429,-0.318179, +-0.815098,-0.281219, +-0.630272,-0.184832, +-0.476389,-0.083919, +-0.307743,0.070715, +-0.139801,0.246377, +-0.007714,0.452725, +0.104559,0.667566, +0.175847,0.903023, +0.215157,1.134221, +0.182840,1.370263, +0.008395,1.554809, +-0.188810,1.726831, +-2.165168,-0.502803, +-1.893693,-0.579203, +-1.602803,-0.657062, +-1.304744,-0.740700, +-0.984845,-0.760706, +-0.697363,-0.695669, +-0.462860,-0.545886, +-0.285737,-0.415706, +-0.059196,-0.220072, +0.148211,0.008677, +0.328199,0.257094, +0.463481,0.524232, +0.568159,0.809915, +0.674776,1.124700, +0.746116,1.405091, +1.320762,1.526668, +1.695346,1.666058, +-2.201819,-1.098296, +-1.850773,-1.079571, +-1.516290,-1.144302, +-1.174597,-1.184131, +-0.819181,-1.207578, +-0.498996,-1.057224, +-0.230771,-0.873687, +-0.010890,-0.685261, +0.208760,-0.486892, +0.428178,-0.223769, +0.647323,0.051897, +0.804169,0.327043, +0.903240,0.620115, +1.061672,0.878482, +1.312615,1.102056, +1.677370,1.190379, +2.012229,1.327944, +-2.038935,-1.586449, +-1.703097,-1.541494, +-1.317944,-1.542737, +-0.887416,-1.628807, +-0.456539,-1.551356, +-0.204071,-1.374723, +0.037718,-1.125092, +0.286898,-0.931166, +0.473700,-0.718818, +0.696364,-0.464889, +0.907222,-0.194553, +1.073287,0.061788, +1.166854,0.305033, +1.332138,0.526529, +1.577041,0.690399, +1.881208,0.784534, +2.190370,0.821700, +-1.824544,-1.991578, +-1.538477,-1.907559, +-1.155142,-1.929822, +-0.614001,-1.859890, +0.115443,-1.777918, +0.217955,-1.537374, +0.364883,-1.327773, +0.552271,-1.103580, +0.753928,-0.907657, +0.928589,-0.681870, +1.112948,-0.469089, +1.246201,-0.241961, +1.408612,-0.062008, +1.548680,0.125714, +1.748555,0.248122, +1.969443,0.298630, +2.201819,0.292532, +1.425069,-1.583066, +1.283815,-1.580675, +1.144180,-1.559964, +1.006363,-1.532455, +0.890448,-1.483269, +0.851737,-1.389386, +0.874291,-1.259361, +0.951282,-1.124573, +1.040299,-0.984461, +1.143468,-0.852381, +1.252259,-0.725400, +1.372908,-0.614485, +1.489205,-0.520299, +1.613694,-0.458777, +1.730617,-0.430805, +1.845526,-0.438674, +1.947106,-0.483693, +1.431403,-1.072674, +1.473407,-1.991578, +1.198312,-1.984650, +0.918114,-1.935510, +0.607910,-1.833210, +0.157248,1.991578, +0.436931,1.733711, +0,0,0,1,2, +0,0,0,2,3, +0,0,0,3,4, +0,0,0,4,5, +0,0,0,5,6, +0,0,0,6,7, +0,0,0,7,8, +0,0,0,8,9, +0,0,0,9,10, +0,0,0,10,11, +0,0,0,11,12, +0,0,0,12,13, +0,0,0,13,14, +0,0,0,14,15, +0,0,0,15,16, +0,0,0,16,17, +1,2,2,1,18,18,19, +-1,3,2,2,19,20,20, +1,4,4,3,20,20,21, +-1,5,4,4,21,22,22, +1,6,6,5,22,22,23, +-1,7,6,6,23,24,24, +1,8,8,7,24,24,25, +-1,9,8,8,25,26,26, +1,10,10,9,26,26,27, +-1,11,10,10,27,28,28, +1,12,12,11,28,28,29, +-1,13,12,12,29,30,30, +1,14,14,13,30,30,31, +-1,15,14,14,31,32,32, +1,16,16,15,32,32,33, +-1,17,16,16,33,34,34, +-1,19,18,18,35,36,36, +1,20,20,19,36,36,37, +-1,21,20,20,37,38,38, +1,22,22,21,38,38,39, +-1,23,22,22,39,40,40, +1,24,24,23,40,40,41, +-1,25,24,24,41,42,42, +1,26,26,25,42,42,43, +-1,27,26,26,43,44,44, +1,28,28,27,44,44,45, +-1,29,28,28,45,46,46, +1,30,30,29,46,46,47, +-1,31,30,30,47,48,48, +1,32,32,31,48,48,49, +-1,33,32,32,49,126,126, +1,34,34,33,126,126,125, +1,36,36,35,52,52,53, +-1,37,36,36,53,54,54, +1,38,38,37,54,54,55, +-1,39,38,38,55,56,56, +1,40,40,39,56,56,57, +-1,41,40,40,57,58,58, +1,42,42,41,58,58,59, +-1,43,42,42,59,60,60, +1,44,44,43,60,60,61, +-1,45,44,44,61,62,62, +1,46,46,45,62,62,63, +-1,47,46,46,63,64,64, +1,48,48,47,64,64,65, +-1,49,48,48,65,66,66, +1,50,50,49,66,66,67, +-1,51,50,50,67,68,68, +-1,53,52,52,69,70,70, +1,54,54,53,70,70,71, +-1,55,54,54,71,72,72, +1,56,56,55,72,72,73, +-1,57,56,56,73,74,74, +1,58,58,57,74,74,75, +-1,59,58,58,75,76,76, +1,60,60,59,76,76,77, +-1,61,60,60,77,78,78, +1,62,62,61,78,78,79, +-1,63,62,62,79,80,80, +1,64,64,63,80,80,81, +-1,65,64,64,81,82,82, +1,66,66,65,82,82,83, +-1,67,66,66,83,84,84, +1,68,68,67,84,84,85, +1,70,70,69,86,86,87, +-1,71,70,70,87,88,88, +1,72,72,71,88,88,89, +-1,73,72,72,89,90,90, +1,74,74,73,90,90,91, +-1,75,74,74,91,92,92, +1,76,76,75,92,92,93, +-1,77,76,76,93,94,94, +1,78,78,77,94,94,95, +-1,79,78,78,95,96,96, +1,80,80,79,96,96,97, +-1,81,80,80,97,98,98, +1,82,82,81,98,98,99, +-1,83,82,82,99,100,100, +1,84,84,83,100,100,101, +-1,85,84,84,101,102,102, +-1,122,121,121,103,104,104, +1,123,123,122,104,104,105, +-1,124,123,123,105,106,106, +1,90,90,124,106,106,107, +-1,91,90,90,107,108,108, +1,92,92,91,108,108,109, +-1,93,92,92,109,110,110, +1,94,94,93,110,110,111, +-1,95,94,94,111,112,112, +1,96,96,95,112,112,113, +-1,97,96,96,113,114,114, +1,98,98,97,114,114,115, +-1,99,98,98,115,116,116, +1,100,100,99,116,116,117, +-1,101,100,100,117,118,118, +1,102,102,101,118,118,119, +0,104,103,120,120, +0,105,104,120,120, +0,106,105,120,120, +0,107,106,120,120, +0,108,107,120,120, +0,109,108,120,120, +0,110,109,120,120, +0,111,110,120,120, +0,112,111,120,120, +0,113,112,120,120, +0,114,113,120,120, +0,115,114,120,120, +0,116,115,120,120, +0,117,116,120,120, +0,118,117,120,120, +0,119,118,120,120, +0 +1 +18 +35 +52 +69 +86 +87 +88 +89 +90 +124 +123 +122 +121 +103 +120 +119 +102 +85 +68 +51 +50 +49 +126 +125 +34 +17 +-1.210690,-0.964805, +-1.075245,-1.108959, +-1.481500,1.570312, +-1.518958,-0.057182, +-1.419172,-0.739888, +-1.276672,-0.881588, +-1.098886,-0.939227, +-0.940660,-2.905431, +-1.097222,2.942764, +-1.121545,2.418963, +-1.051635,2.008588, +-0.949022,1.752945, +-0.848188,1.597661, +-0.756779,-2.183926, +-0.619857,-2.195005, +-0.853812,-2.210407, +-0.691590,-2.173274, +-0.553086,-2.148838, +-0.437843,-2.131556, +-0.342907,-2.118694, +-0.264702,-2.108752, +-0.522960,-2.472033, +-0.440622,-2.379988, +-0.365621,-2.304828, +-0.298925,-2.242949, +-0.240401,-2.191486, +-0.695011,2.405584, +-0.718141,2.470463, +-0.736756,2.529831, +-0.751725,2.583996, +-0.763762,2.633333, +-0.773448,2.678251, +-0.781251,2.719160, +-0.787542,2.756452, +-0.792615,2.790496, +-1.226233,-1.348903, +-1.045769,-1.410780, +-1.456097,-2.165175, +-1.332662,-1.596146, +-1.156055,-1.407946, +-0.932484,-1.317261, +-0.997044,-1.920510, +-1.209377,-1.751128, +-1.375170,-1.670612, +-1.529657,-0.850667, +-1.462977,3.038347, +-1.208287,1.029466, +-1.045419,1.051505, +-0.999370,-2.759025, +-0.813313,-2.616169, +-0.844452,-2.604025, +-0.657200,-2.465249, +-0.496583,-2.378328, +-0.366813,-2.319594, +-0.264080,-2.277517, +-0.441574,-2.561537, +-0.352049,-2.446249, +-0.272258,-2.353708, +-0.203368,-2.278981, +-0.647089,2.420727, +-0.676475,2.492278, +-0.699820,2.556906, +-0.718386,2.615104, +-0.733192,2.667446, +-0.745045,2.714527, +-0.754574,2.756922, +-0.762268,2.795166, +-0.768508,2.829743, +-0.773590,2.861085, +-0.777743,2.889571, +-1.163502,-1.871553, +-1.266976,-2.471905, +-1.108626,-1.965750, +-0.903377,-1.743200, +-0.705602,-1.481065, +-0.784059,-1.119358, +-0.833456,-0.772146, +-0.871877,-0.415282, +-0.885810,-0.002028, +-0.943454,0.420059, +-0.973581,0.885607, +-1.018328,1.485484, +-1.000368,2.053498, +-0.924028,2.512999, +-0.833412,2.850035, +-0.697782,-3.122866, +-0.531947,-2.868180, +-0.374727,-2.692859, +-0.237988,-2.543918, +-0.314309,-2.683712, +-0.220720,-2.535608, +-0.140145,-2.418385, +-0.580454,2.440012, +-0.619600,2.519651, +-0.650234,2.590371, +-0.674292,2.652993, +-0.693299,2.708419, +-0.708428,2.757534, +-0.720569,2.801157, +-0.730391,2.840020, +-0.738403,2.874762, +-0.744988,2.905932, +-0.750441,2.934003, +-0.754988,2.959377, +-0.758803,2.982396, +-0.954733,-2.320240, +-0.813327,-2.187191, +-0.560418,-1.933969, +-0.362757,-1.590668, +-0.320569,-1.241451, +-0.297710,-0.914371, +-0.283831,-0.591579, +-0.270571,-0.214204, +-0.295495,0.131334, +-0.323526,0.453315, +-0.363335,0.766953, +-0.434340,1.140205, +-0.538332,1.614839, +-0.563382,2.040041, +-0.507779,2.413143, +-0.402745,2.726168, +-0.282989,3.049345, +-0.144166,-2.941544, +-0.111413,-2.853894, +-0.410786,2.362839, +-0.482777,2.465383, +-0.538243,2.554953, +-0.580892,2.632680, +-0.613872,2.699997, +-0.639623,2.758362, +-0.659965,2.809123, +-0.676229,2.853458, +-0.689391,2.892370, +-0.700164,2.926697, +-0.709079,2.957137, +-0.716531,2.984266, +-0.722817,3.008563, +-0.728167,3.030424, +-0.732756,3.050181, +-0.736721,3.068109, +-0.607841,-2.598693, +-0.392201,-2.293386, +-0.155495,-1.954181, +0.031626,-1.595137, +0.133443,-1.291718, +0.195320,-0.969652, +0.241163,-0.550795, +0.255527,-0.170029, +0.253688,0.174990, +0.220292,0.501721, +0.164942,0.829709, +0.081982,1.167514, +-0.049196,1.529743, +-0.116846,1.917702, +-0.116161,2.253016, +-0.022006,2.565861, +0.091067,2.893833, +-0.219044,2.379715, +-0.330318,2.500208, +-0.415125,2.602070, +-0.479089,2.687639, +-0.527590,2.759545, +-0.564842,2.820229, +-0.593910,2.871770, +-0.616965,2.915870, +-0.635541,2.953891, +-0.650729,2.986920, +-0.663313,3.015819, +-0.673868,3.041277, +-0.682819,3.063846, +-0.690485,3.083972, +-0.697110,3.102017, +-0.702882,3.118278, +-0.707947,3.133000, +-0.712423,-3.136800, +-0.261312,-2.795893, +-0.059574,-2.472400, +0.144087,-2.172647, +0.340112,-1.863228, +0.516337,-1.570456, +0.654654,-1.224973, +0.729752,-0.787706, +0.775944,-0.260283, +0.776306,0.194922, +0.734543,0.623689, +0.656685,1.031082, +0.541377,1.384377, +0.419125,1.690625, +0.319913,2.009015, +0.244632,2.365405, +0.388177,2.638262, +-0.078599,2.550820, +-0.217761,2.667758, +-0.321694,2.761375, +-0.398827,2.836784, +-0.456761,2.898175, +-0.501104,2.948768, +-0.535743,2.990980, +-0.563333,3.026616, +-0.585706,3.057027, +0.520903,0.406290, +0.503763,0.424799, +0.488103,0.441275, +0.473759,0.456030, +0.460584,0.469313, +0.448454,0.481331, +0.437255,0.492252, +0.426893,0.502219, +0.417280,0.511349, +0.408343,0.519742, +0.052107,-3.070603, +0.196001,-2.829917, +0.377618,-2.553389, +0.573513,-2.338730, +0.796266,-2.087125, +0.994029,-1.820353, +1.160282,-1.354468, +1.260956,-0.708464, +1.278203,0.237279, +1.215383,0.998670, +1.092726,1.537564, +0.936137,1.922415, +0.764070,2.182636, +0.572307,2.448410, +0.892649,0.393089, +0.827070,0.441613, +0.770452,0.477716, +0.721569,0.505559, +0.679228,0.527654, +0.642376,0.545599, +0.610124,0.560452, +0.581737,0.572946, +0.556609,0.583597, +0.534243,0.592783, +0.514232,0.600786, +0.496239,0.607819, +0.479987,0.614049, +0.465244,0.619604, +0.451815,0.624589, +0.439537,0.629087, +0.428273,0.633166, +0.417905,0.636882, +0.408333,0.640280, +0.399469,0.643401, +0.391240,0.646276, +0.742509,-0.834337, +0.792614,-0.855292, +0.850725,-0.882587, +0.679226,-3.017834, +0.894150,-2.938011, +1.114743,-2.973418, +1.275257,3.071879, +1.362601,2.441108, +1.329763,1.684367, +1.225605,1.294777, +1.113383,1.114894, +1.047669,2.989544, +0.816483,2.954860, +0.561021,3.032830, +0.784890,0.888619, +0.730887,0.866939, +0.684739,0.850079, +0.645041,0.836598, +0.610650,0.825577, +0.580647,0.816401, +0.554293,0.808644, +0.530995,0.802001, +0.510275,0.796249, +0.491745,0.791219, +0.475087,0.786785, +0.460040,0.782846, +0.446387,0.779324, +0.433948,0.776156, +0.422572,0.773291, +0.412131,0.770689, +0.402517,0.768314, +0.393636,0.766137, +0.385409,0.764136, +0.377769,0.762289, +0.370654,0.760580, +0.618223,-1.119336, +0.647979,-1.162319, +0.680733,-1.213660, +0.716489,-1.275692, +0.754923,-1.351480, +0.795115,-1.444935, +0.920513,2.208309, +0.913757,1.977400, +0.885803,1.775830, +0.845456,1.611111, +0.800171,1.480629, +0.754754,1.377971, +0.711761,1.296688, +0.672295,1.231532, +0.636647,1.178556, +0.604697,1.134866, +0.576147,1.098347, +0.550636,1.067445, +0.527805,1.041004, +0.507320,1.018154, +0.488883,0.998228, +0.472233,0.980713, +0.457144,0.965205, +0.443424,0.951384, +0.430907,0.938993, +0.419449,0.927825, +0.408928,0.917710, +0.399240,0.908507, +0.390292,0.900099, +0.382006,0.892390, +0.374315,0.885295, +0.367157,0.878745, +0.360481,0.872681, +0.354241,0.867050, +0.348397,0.861807, +0.507543,-1.292865, +0.523095,-1.337349, +0.539316,-1.387581, +0.555990,-1.444443, +0.572764,-1.508890, +0.589099,-1.581893, +0.637308,2.034031, +0.632659,1.907262, +0.621694,1.792097, +0.606417,1.689625, +0.588587,1.599663, +0.569571,1.521258, +0.550335,1.453112, +0.531509,1.393858, +0.513471,1.342205, +0.496425,1.297007, +0.480457,1.257280, +0.465583,1.222193, +0.451772,1.191050, +0.438970,1.163273, +0.427110,1.138381, +0.416120,1.115973, +0.405931,1.095715, +0.396474,1.077326, +0.387685,1.060569, +0.379505,1.045245, +0.371880,1.031184, +0.364762,1.018240, +0.358105,1.006290, +0.351871,0.995227, +0.346022,0.984957, +0.340527,0.975400, +0.335357,0.966487, +0.330484,0.958155, +0.325886,0.950350, +0.421464,-1.403389, +0.429074,-1.444240, +0.436610,-1.488869, +0.443917,-1.537620, +0.450788,-1.590826, +0.456966,-1.648782, +0.470951,1.966015, +0.470541,1.879442, +0.467436,1.798880, +0.462246,1.724658, +0.455541,1.656778, +0.447807,1.595010, +0.439443,1.538973, +0.430757,1.488213, +0.421980,1.442244, +0.413279,1.400588, +0.404769,1.362790, +0.396528,1.328433, +0.388603,1.297139, +0.381021,1.268568, +0.373793,1.242422, +0.366920,1.218436, +0.360396,1.196377, +0.354211,1.176042, +0.348349,1.157250, +0.342796,1.139844, +0.337536,1.123687, +0.332550,1.108655, +0.327824,1.094641, +0.323341,1.081551, +0.319087,1.069299, +0.315046,1.057812, +0.311205,1.047022, +0.307552,1.036871, +0.304074,1.027305, +0.356234,-1.478259, +0.359542,-1.514802, +0.362587,-1.553917, +0.365276,-1.595752, +0.367498,-1.640438, +0.369127,-1.688081, +0.370020,-1.738744, +0.370294,1.864541, +0.370636,1.802601, +0.369778,1.744449, +0.367945,1.690105, +0.365343,1.639497, +0.362154,1.592487, +0.358533,1.548890, +0.354611,1.508496, +0.350492,1.471082, +0.346262,1.436425, +0.341986,1.404306, +0.337717,1.374514, +0.333492,1.346854, +0.329341,1.321142, +0.325284,1.297211, +0.321336,1.274905, +0.317507,1.254086, +0.313803,1.234626, +0.310226,1.216409, +0.306778,1.199330, +0.303456,1.183296, +0.300261,1.168221, +0.297187,1.154028, +0.294232,1.140647, +0.291392,1.128014, +0.288663,1.116072, +0.286039,1.104769, +0.283517,1.094058, +0.306362,-1.531778, +0.307299,-1.564410, +0.307954,-1.598872, +0.308274,-1.635233, +0.308197,-1.673551, +0.307659,-1.713866, +0.306588,-1.756197, +0.303463,1.855259, +0.305366,1.804951, +0.306500,1.757158, +0.306968,1.711898, +0.306869,1.669146, +0.306293,1.628843, +0.305323,1.590904, +0.304034,1.555226, +0.302490,1.521698, +0.300747,1.490199, +0.298851,1.460607, +0.296844,1.432801, +0.294756,1.406665, +0.292618,1.382084, +0.290450,1.358951, +0.288271,1.337164, +0.286096,1.316629, +0.283937,1.297256, +0.281803,1.278963, +0.279701,1.261672, +0.277637,1.245314, +0.275615,1.229824, +0.273639,1.215140, +0.271709,1.201207, +0.269828,1.187974, +0.267996,1.175394, +0.266214,1.163423, +0.264481,1.152022, +0.267507,-1.571730, +0.267104,-1.601026, +0.266449,-1.631677, +0.265509,-1.663718, +0.264249,-1.697175, +0.262634,-1.732065, +0.260626,-1.768390, +0.256128,1.848924, +0.258745,1.806570, +0.260832,1.766007, +0.262442,1.727248, +0.263626,1.690285, +0.264433,1.655089, +0.264910,1.621618, +0.265101,1.589818, +0.265046,1.559626, +0.264781,1.530974, +0.264338,1.503791, +0.263745,1.478004, +0.263027,1.453540, +0.262207,1.430327, +0.261304,1.408294, +0.260333,1.387374, +0.259310,1.367501, +0.258246,1.348613, +0.257152,1.330651, +0.256037,1.313560, +0.254907,1.297287, +0.253771,1.281782, +0.252632,1.267000, +0.251496,1.252897, +0.250366,1.239433, +0.249245,1.226569, +0.248135,1.214271, +0.247040,1.202505, +0.236612,-1.602602, +0.235439,-1.629093, +0.234050,-1.656622, +0.232427,-1.685207, +0.230548,-1.714859, +0.228392,-1.745586, +0.225940,-1.777385, +0.220992,1.844324, +0.223918,1.807753, +0.226460,1.772522, +0.228645,1.738640, +0.230504,1.706105, +0.232064,1.674903, +0.233353,1.645010, +0.234398,1.616397, +0.235225,1.589026, +0.235856,1.562858, +0.236313,1.537847, +0.236617,1.513948, +0.236786,1.491114, +0.236837,1.469297, +0.236783,1.448452, +0.236640,1.428530, +0.236418,1.409487, +0.236129,1.391279, +0.235782,1.373864, +0.235385,1.357200, +0.234946,1.341249, +0.234471,1.325973, +0.233967,1.311338, +0.233438,1.297310, +0.232890,1.283856, +0.232325,1.270948, +0.231747,1.258555, +0.231160,1.246653, +0.211571,-1.627131, +0.209953,-1.651260, +0.208154,-1.676207, +0.206161,-1.701980, +0.203963,-1.728586, +0.201546,-1.756025, +0.198899,-1.784295, +0.193940,1.840833, +0.196973,1.808656, +0.199715,1.777518, +0.202183,1.747427, +0.204394,1.718384, +0.206366,1.690379, +0.208115,1.663402, +0.209659,1.637432, +0.211013,1.612448, +0.212195,1.588424, +0.213218,1.565333, +0.214097,1.543143, +0.214844,1.521824, +0.215473,1.501344, +0.215995,1.481670, +0.216420,1.462771, +0.216757,1.444613, +0.217016,1.427166, +0.217205,1.410399, +0.217330,1.394281, +0.217399,1.378783, +0.217418,1.363878, +0.217391,1.349538, +0.217325,1.335737, +0.217224,1.322451, +0.217091,1.309655, +0.216930,1.297327, +0.216745,1.285445, +0.190925,-1.647067, +0.189053,-1.669195, +0.187029,-1.691981, +0.184846,-1.715430, +0.182495,-1.739546, +0.179969,-1.764326, +0.177260,-1.789769, +0.174362,-1.815865, +0.175534,1.809367, +0.178342,1.781471, +0.180933,1.754411, +0.183318,1.728187, +0.185508,1.702797, +0.187514,1.678231, +0.189347,1.654479, +0.191019,1.631527, +0.192539,1.609357, +0.193918,1.587951, +0.195166,1.567289, +0.196294,1.547349, +0.197309,1.528109, +0.198220,1.509548, +0.199036,1.491640, +0.199765,1.474364, +0.200412,1.457697, +0.200985,1.441614, +0.201490,1.426095, +0.201933,1.411117, +0.202318,1.396659, +0.202651,1.382700, +0.202936,1.369219, +0.203177,1.356198, +0.203378,1.343616, +0.203543,1.331457, +0.203674,1.319703, +0.173643,-1.663577, +0.171634,-1.683994, +0.169496,-1.704951, +0.167226,-1.726452, +0.164817,-1.748497, +0.162266,-1.771084, +0.159567,-1.794211, +0.156717,-1.817871, +0.158086,1.809942, +0.160886,1.784677, +0.163511,1.760094, +0.165967,1.736195, +0.168263,1.712978, +0.170405,1.690437, +0.172400,1.668567, +0.174257,1.647357, +0.175983,1.626796, +0.177584,1.606871, +0.179069,1.587568, +0.180445,1.568873, +0.181717,1.550770, +0.182893,1.533242, +0.183978,1.516272, +0.184980,1.499844, +0.185902,1.483940, +0.186751,1.468544, +0.187532,1.453639, +0.188248,1.439207, +0.188906,1.425232, +0.189508,1.411699, +0.190058,1.398591, +0.190561,1.385892, +0.191020,1.373589, +0.191438,1.361665, +0.191817,1.350108, +0.158985,-1.677468, +0.156910,-1.696409, +0.154726,-1.715801, +0.152431,-1.735646, +0.150020,-1.755944, +0.147491,-1.776692, +0.144841,-1.797889, +0.142067,-1.819528, +0.143618,1.810416, +0.146369,1.787328, +0.148977,1.764808, +0.151445,1.742857, +0.153778,1.721475, +0.155982,1.700657, +0.158061,1.680400, +0.160021,1.660697, +0.161867,1.641540, +0.163604,1.622921, +0.165237,1.604829, +0.166772,1.587253, +0.168214,1.570183, +0.169568,1.553607, +0.170838,1.537511, +0.172029,1.521884, +0.173145,1.506712, +0.174191,1.491982, +0.175171,1.477682, +0.176089,1.463799, +0.176947,1.450320, +0.177750,1.437232, +0.178502,1.424522, +0.179204,1.412179, +0.179861,1.400190, +0.180474,1.388544, +0.181047,1.377229, +0.146407,-1.689313, +0.144312,-1.706970, +0.142123,-1.725009, +0.139840,-1.743431, +0.137459,-1.762236, +0.134980,-1.781421, +0.132399,-1.800984, +0.121249,1.833957, +0.131430,1.810814, +0.134112,1.789558, +0.136673,1.768782, +0.139118,1.748487, +0.141448,1.728673, +0.143668,1.709337, +0.145781,1.690477, +0.147790,1.672088, +0.149700,1.654165, +0.151515,1.636701, +0.153238,1.619689, +0.154873,1.603121, +0.156424,1.586989, +0.157895,1.571284, +0.159289,1.555997, +0.160611,1.541118, +0.161863,1.526637, +0.163049,1.512545, +0.164172,1.498830, +0.165235,1.485484, +0.166242,1.472496, +0.167195,1.459857, +0.168097,1.447555, +0.168951,1.435582, +0.169759,1.423928, +0.170524,1.412582, +0.171247,1.401537, +0.135504,-1.699530, +0.133416,-1.716061, +0.131249,-1.732921, +0.129000,-1.750108, +0.126668,-1.767622, +0.124252,-1.785461, +0.121750,-1.803624, +0.109292,1.832996, +0.121026,1.811153, +0.123628,1.791459, +0.126127,1.772177, +0.128527,1.753306, +0.130830,1.734848, +0.133037,1.716799, +0.135151,1.699160, +0.137176,1.681925, +0.139114,1.665092, +0.140967,1.648656, +0.142740,1.632611, +0.144433,1.616952, +0.146052,1.601672, +0.147597,1.586765, +0.149073,1.572223, +0.150483,1.558039, +0.151828,1.544206, +0.153111,1.530716, +0.154336,1.517560, +0.155505,1.504732, +0.156620,1.492222, +0.157683,1.480024, +0.158698,1.468129, +0.159666,1.456529, +0.160589,1.445216, +0.161470,1.434183, +0.162310,1.423422, +0.125967,-1.708431, +0.123905,-1.723969, +0.121774,-1.739791, +0.119572,-1.755896, +0.117299,-1.772284, +0.114954,-1.788954, +0.112536,-1.805902, +0.099006,1.832172, +0.112043,1.811444, +0.114560,1.793100, +0.116989,1.775111, +0.119333,1.757479, +0.121592,1.740203, +0.123769,1.723283, +0.125865,1.706718, +0.127883,1.690505, +0.129823,1.674642, +0.131690,1.659124, +0.133483,1.643948, +0.135207,1.629110, +0.136863,1.614605, +0.138454,1.600427, +0.139981,1.586571, +0.141446,1.573032, +0.142853,1.559803, +0.144204,1.546879, +0.145499,1.534253, +0.146743,1.521918, +0.147935,1.509870, +0.149080,1.498100, +0.150177,1.486603, +0.151230,1.475372, +0.152241,1.464400, +0.153210,1.453683, +0.154140,1.443212, +0.117557,-1.716254, +0.115532,-1.730909, +0.113447,-1.745812, +0.111300,-1.760962, +0.109092,-1.776360, +0.106821,-1.792002, +0.104487,-1.807889, +0.090064,1.831457, +0.103040,1.811942, +0.106641,1.794530, +0.108997,1.777672, +0.111278,1.761126, +0.113485,1.744892, +0.115621,1.728969, +0.117685,1.713357, +0.119681,1.698053, +0.121608,1.683056, +0.123469,1.668364, +0.125266,1.653973, +0.127000,1.639879, +0.128672,1.626079, +0.130286,1.612570, +0.131842,1.599346, +0.133342,1.586403, +0.134788,1.573737, +0.136181,1.561343, +0.137525,1.549216, +0.138819,1.537350, +0.140067,1.525741, +0.141269,1.514383, +0.142427,1.503271, +0.143543,1.492400, +0.144618,1.481765, +0.145654,1.471360, +0.146652,1.461180, +0.110088,-1.723183, +0.108107,-1.737048, +0.106073,-1.751131, +0.103985,-1.765433, +0.101843,-1.779952, +0.099646,-1.794687, +0.069944,1.849174, +0.082221,1.830831, +0.094421,1.812527, +0.099666,1.795787, +0.101947,1.779926, +0.104163,1.764341, +0.106315,1.749030, +0.108402,1.733994, +0.110427,1.719233, +0.112391,1.704744, +0.114294,1.690527, +0.116138,1.676579, +0.117924,1.662898, +0.119654,1.649481, +0.121329,1.636326, +0.122950,1.623430, +0.124518,1.610788, +0.126036,1.598398, +0.127504,1.586256, +0.128924,1.574357, +0.130298,1.562698, +0.131626,1.551275, +0.132910,1.540084, +0.134152,1.529120, +0.135353,1.518379, +0.136514,1.507856, +0.137637,1.497548, +0.138722,1.487450, +0.139772,1.477557, +0.103413,-1.729362, +0.101480,-1.742517, +0.099499,-1.755865, +0.097471,-1.769407, +0.095395,-1.783142, +0.093271,-1.797069, +0.063712,1.847548, +0.075287,1.830278, +0.086796,1.813043, +0.093477,1.796901, +0.095685,1.781927, +0.097835,1.767196, +0.099928,1.752710, +0.101964,1.738469, +0.103945,1.724471, +0.105870,1.710716, +0.107742,1.697202, +0.109561,1.683929, +0.111328,1.670894, +0.113044,1.658095, +0.114710,1.645531, +0.116327,1.633198, +0.117897,1.621094, +0.119420,1.609216, +0.120898,1.597560, +0.122331,1.586125, +0.123722,1.574906, +0.125071,1.563901, +0.126378,1.553105, +0.127647,1.542515, +0.128877,1.532129, +0.130070,1.521941, +0.131226,1.511949, +0.132347,1.502149, +0.133435,1.492537, +0.097412,-1.734907, +0.095528,-1.747419, +0.093602,-1.760105, +0.091634,-1.772963, +0.089623,-1.785994, +0.087570,-1.799196, +0.058165,1.846101, +0.069113,1.829786, +0.080005,1.813503, +0.087948,1.797895, +0.090084,1.783713, +0.092169,1.769749, +0.094203,1.756004, +0.096186,1.742477, +0.098120,1.729169, +0.100005,1.716077, +0.101841,1.703203, +0.103629,1.690543, +0.105371,1.678098, +0.107066,1.665865, +0.108716,1.653843, +0.110321,1.642029, +0.111884,1.630422, +0.113403,1.619019, +0.114881,1.607817, +0.116319,1.596815, +0.117716,1.586009, +0.119075,1.575396, +0.120396,1.564974, +0.121680,1.554741, +0.122929,1.544692, +0.124142,1.534825, +0.125322,1.525137, +0.126468,1.515625, +0.127582,1.506286, +0.091989,-1.739909, +0.090155,-1.751839, +0.088284,-1.763924, +0.086374,-1.776164, +0.084427,-1.788559, +0.042772,1.860286, +0.053196,1.844805, +0.063581,1.829346, +0.073917,1.813915, +0.082980,1.798788, +0.085047,1.785318, +0.087068,1.772046, +0.089044,1.758969, +0.090974,1.746089, +0.092859,1.733406, +0.094701,1.720918, +0.096498,1.708625, +0.098253,1.696527, +0.099965,1.684622, +0.101635,1.672909, +0.103263,1.661386, +0.104852,1.650052, +0.106400,1.638905, +0.107910,1.627943, +0.109381,1.617164, +0.110815,1.606566, +0.112212,1.596147, +0.113573,1.585904, +0.114900,1.575836, +0.116192,1.565939, +0.117450,1.556212, +0.118676,1.546651, +0.119870,1.537255, +0.121033,1.528020, +0.122165,1.518945, +0.087065,-1.744446, +0.085281,-1.755843, +0.083463,-1.767381, +0.081610,-1.779060, +0.079724,-1.790878, +0.038809,1.858348, +0.048719,1.843639, +0.058595,1.828949, +0.068430,1.814285, +0.078216,1.799654, +0.080492,1.786769, +0.082451,1.774122, +0.084370,1.761652, +0.086247,1.749361, +0.088085,1.737247, +0.089882,1.725310, +0.091640,1.713550, +0.093358,1.701966, +0.095038,1.690557, +0.096680,1.679322, +0.098284,1.668260, +0.099851,1.657370, +0.101381,1.646650, +0.102876,1.636099, +0.104335,1.625714, +0.105760,1.615495, +0.107151,1.605439, +0.108509,1.595545, +0.109834,1.585810, +0.111127,1.576233, +0.112389,1.566811, +0.113621,1.557542, +0.114823,1.548425, +0.115995,1.539456, +0.117139,1.530635, diff --git a/src/maps/Arbitrary.java b/src/maps/Arbitrary.java index ea800d3..77465c4 100644 --- a/src/maps/Arbitrary.java +++ b/src/maps/Arbitrary.java @@ -26,9 +26,9 @@ package maps; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; + import maps.Projection.Property; import maps.Projection.Type; -import utils.Math2; /** * A class for completely arbitrary projections, where every square degree can be specified anywhere on the plane. @@ -37,7 +37,6 @@ import utils.Math2; */ public class Arbitrary { - private static final int NE = 0, NW = 1, SW = 2, SE = 3; private static final int X = 0, Y = 1; @@ -69,38 +68,71 @@ public class Arbitrary { private static class ArbitraryProjection extends Projection { - private double[][] vertices; // the vertex x-y coordinates - private int[][][] cells; // the indices of the corner of each cell + private String filename; // the data filename + private double[][][][] cells; // the values of the corner of each cell + private int[][] cellShapes; // the slope of each cell + private double[][][] pixels; // the pixel values, for inverse mapping + private double[][] edge; // the indices of the edge vertices public ArbitraryProjection(String title, String description, boolean interrupted, Type type, Property property, String filename) { super(title, description, 0, 0, interrupted ? 0b1010 : 0b1011, type, property, 4); + this.filename = filename; + } + + + public void setParameters(double... params) throws IllegalArgumentException { // these maps don't actually have parameters, but this is the best place to load files + if (cells != null) + return; // but don't do it if you've already done it BufferedReader in = null; try { in = new BufferedReader(new FileReader(String.format("src/data/%s", filename))); // parsing the input mesh is pretty simple String[] row = in.readLine().split(","); // get the header - vertices = new double[Integer.parseInt(row[0])][2]; - cells = new int[Integer.parseInt(row[1])][Integer.parseInt(row[2])][4]; - width = Double.parseDouble(row[3]); - height = Double.parseDouble(row[4]); + double[][] vertices = new double[Integer.parseInt(row[0])][2]; + cells = new double[Integer.parseInt(row[1])][Integer.parseInt(row[2])][][]; + cellShapes = new int[cells.length][cells[0].length]; + edge = new double[Integer.parseInt(row[3])][]; + pixels = new double[Integer.parseInt(row[4])][Integer.parseInt(row[5])][2]; + width = Double.parseDouble(row[6]); + height = Double.parseDouble(row[7]); + for (int i = 0; i < vertices.length; i ++) { // do the vertex coordinates row = in.readLine().split(","); for (int j = 0; j < vertices[i].length; j ++) vertices[i][j] = Double.parseDouble(row[j]); } + for (int i = 0; i < cells.length; i ++) { // get the cell vertices for (int j = 0; j < cells[i].length; j ++) { row = in.readLine().split(","); - for (int k = 0; k < cells[i][j].length; k ++) - cells[i][j][k] = Integer.parseInt(row[k]); + cellShapes[i][j] = Integer.parseInt(row[0]); + cells[i][j] = new double[row.length-1][]; + for (int k = 1; k < row.length; k ++) + cells[i][j][k-1] = vertices[Integer.parseInt(row[k])]; } - } // and skip the edge; it's not relevant here + } + + for (int i = 0; i < edge.length; i ++) { // the edge + row = in.readLine().split(","); + edge[i] = vertices[Integer.parseInt(row[0])]; + } + + for (int i = 0; i < pixels.length; i ++) { // the pixels + for (int j = 0; j < pixels[i].length; j ++) { + row = in.readLine().split(","); + for (int k = 0; k < pixels[i][j].length; k ++) + pixels[i][j][k] = Double.parseDouble(row[k]); + } + } } catch (IOException | NullPointerException | ArrayIndexOutOfBoundsException e) { - System.err.println("Could not load mesh: "+e); - width = 2; - height = 2; - vertices = new double[][] {{1,1},{-1,1},{-1,-1},{1,-1}}; - cells = new int[][][] {{{0,1,2,3}}}; + cells = new double[][][][] {{{{0,0},{0,0},{0,0},{0,0}}}}; + cellShapes = new int[][] {{0}}; + edge = new double[][] {{0,0}}; + pixels = new double[][][] {{{0,0}}}; + width = 0; + height = 0; + e.printStackTrace(); + throw new IllegalArgumentException("Missing or corrupt data file for "+this.getName()); } finally { try { if (in != null) in.close(); @@ -120,11 +152,40 @@ public class Arbitrary { double ce = (lon+Math.PI)/(2*Math.PI)*cells[i].length - j; double cn = 1 - cs; double cw = 1 - ce; - double[] ne = vertices[cells[i][j][NE]], nw = vertices[cells[i][j][NW]], - sw = vertices[cells[i][j][SW]], se = vertices[cells[i][j][SE]]; - return new double[] { - cs*cw*sw[X] + cs*ce*se[X] + cn*cw*nw[X] + cn*ce*ne[X], - cs*cw*sw[Y] + cs*ce*se[Y] + cn*cw*nw[Y] + cn*ce*ne[Y] }; + double[][] v; // which vertices we use depends on some things + double[] c; + + if (cellShapes[i][j] < 0) { // for negative sloped cells, + if (ce >= cs) { // is it in the ne, + v = new double[][] {cells[i][j][0], cells[i][j][1], cells[i][j][5]}; + c = new double[] { 1-cw-cs, cw, cs}; + } + else { // or the sw? + v = new double[][] {cells[i][j][3], cells[i][j][4], cells[i][j][2]}; + c = new double[] { 1-ce-cn, ce, cn}; + } + } + else if (cellShapes[i][j] > 0) { // for positive sloped cells, + if (ce >= cn) { // is it in the se, + v = new double[][] {cells[i][j][5], cells[i][j][0], cells[i][j][4]}; + c = new double[] { 1-cn-cw, cn, cw}; + } + else { // or the nw? + v = new double[][] {cells[i][j][2], cells[i][j][3], cells[i][j][1]}; + c = new double[] { 1-cs-ce, cs, ce}; + } + } + else { // for single-element cells + v = new double[][] {cells[i][j][0], cells[i][j][1], cells[i][j][2], cells[i][j][3]}; // we can just use all of them + c = new double[] { cn*ce, cn*cw, cs*cw, cs*ce}; + } + + double[] coords = new double[] {0, 0}; + for (int k = 0; k < v.length; k ++) { + coords[X] += c[k]*v[k][X]; + coords[Y] += c[k]*v[k][Y]; + } + return coords; } diff --git a/src/maps/Projection.java b/src/maps/Projection.java index 8ebc318..8a7bae7 100644 --- a/src/maps/Projection.java +++ b/src/maps/Projection.java @@ -151,7 +151,7 @@ public abstract class Projection { public abstract double[] inverse(double x, double y); //convert Cartesian coordinates to spherical - public void setParameters(double... params) { + public void setParameters(double... params) throws IllegalArgumentException { }