diff --git a/tests/input/es.xml b/tests/input/es.xml new file mode 100644 index 0000000..b53728f --- /dev/null +++ b/tests/input/es.xml @@ -0,0 +1,93 @@ + + + 2.49.0.0.724.0.ES.20240904092839.622201PRP106221725442119 + http://www.aemet.es + 2024-09-04T09:28:39-00:00 + Actual + Alert + Public + + es-ES + Met + Aviso de lluvias de nivel amarillo + Monitor + Future + Moderate + Likely + + AEMET-Meteoalerta fenomeno + PR;Lluvias + + 2024-09-04T11:28:39+02:00 + 2024-09-06T00:00:00+02:00 + 2024-09-06T23:59:59+02:00 + AEMET. Agencia Estatal de Meteorología + Aviso de lluvias de nivel amarillo. Pirineo oscense + Precipitación acumulada en una hora: 20 mm. + Esté atento. Manténgase informado de la predicción meteorológica más actualizada. Se pueden producir daños moderados a personas y bienes, especialmente a aquellos vulnerables o en zonas expuestas al fenómeno. + https://www.aemet.es/es/eltiempo/prediccion/avisos + AEMET + + AEMET-Meteoalerta nivel + amarillo + + + AEMET-Meteoalerta parametro + P1;Precipitación acumulada en una hora;20 mm + + + AEMET-Meteoalerta probabilidad + 40%-70% + + + Pirineo oscense + 42.74,-0.9 42.79,-0.85 42.85,-0.86 42.88,-0.81 42.9,-0.82 42.92,-0.78 42.92,-0.73 42.9,-0.73 42.83,-0.6 42.8,-0.6 42.78,-0.57 42.8,-0.52 42.82,-0.51 42.8,-0.44 42.8,-0.39 42.84,-0.35 42.84,-0.31 42.81,-0.24 42.78,-0.16 42.73,-0.11 42.72,-0.07 42.69,-0.06 42.69,0.0 42.72,0.09 42.72,0.14 42.74,0.18 42.72,0.26 42.67,0.3 42.72,0.36 42.69,0.4 42.69,0.58 42.7,0.59 42.69,0.66 42.66,0.7 42.62,0.71 42.61,0.77 42.55,0.75 42.53,0.73 42.5,0.73 42.47,0.7 42.44,0.71 42.39,0.75 42.35,0.76 42.25,0.74 42.17,0.7 42.12,0.7 42.08,0.68 42.03,0.65 41.96,0.58 41.97,0.55 41.97,0.47 41.99,0.47 42.03,0.44 42.07,0.41 42.06,0.35 42.06,0.32 42.16,0.33 42.17,0.3 42.23,0.28 42.22,0.19 42.24,0.15 42.25,0.1 42.28,0.11 42.3,0.07 42.3,0.01 42.26,0.01 42.26,-0.04 42.32,-0.04 42.36,-0.06 42.31,-0.14 42.3,-0.17 42.31,-0.22 42.34,-0.23 42.35,-0.36 42.34,-0.4 42.34,-0.47 42.36,-0.52 42.39,-0.58 42.39,-0.65 42.43,-0.65 42.48,-0.7 42.45,-0.73 42.46,-0.78 42.44,-0.85 42.46,-0.88 42.54,-0.92 42.59,-0.92 42.61,-0.9 42.66,-0.93 42.67,-0.89 42.7,-0.9 42.74,-0.9 + + AEMET-Meteoalerta zona + 622201 + + + + + en-GB + Met + Moderate rain warning + Monitor + Future + Moderate + Likely + + AEMET-Meteoalerta fenomeno + PR;Lluvias + + 2024-09-04T11:28:39+02:00 + 2024-09-06T00:00:00+02:00 + 2024-09-06T23:59:59+02:00 + AEMET. State Meteorological Agency + Moderate rain warning. Pirineo oscense + One-hour accumulated precipitation: 20 mm. + Be aware, keep up to date with the latest weather forecast. Moderate damages to people and properties may occur, especially to those vulnerable or in exposed areas. + https://www.aemet.es/en/eltiempo/prediccion/avisos + AEMET + + AEMET-Meteoalerta nivel + amarillo + + + AEMET-Meteoalerta parametro + P1;One-hour accumulated precipitation;20 mm + + + AEMET-Meteoalerta probabilidad + 40%-70% + + + Pirineo oscense + 42.74,-0.9 42.79,-0.85 42.85,-0.86 42.88,-0.81 42.9,-0.82 42.92,-0.78 42.92,-0.73 42.9,-0.73 42.83,-0.6 42.8,-0.6 42.78,-0.57 42.8,-0.52 42.82,-0.51 42.8,-0.44 42.8,-0.39 42.84,-0.35 42.84,-0.31 42.81,-0.24 42.78,-0.16 42.73,-0.11 42.72,-0.07 42.69,-0.06 42.69,0.0 42.72,0.09 42.72,0.14 42.74,0.18 42.72,0.26 42.67,0.3 42.72,0.36 42.69,0.4 42.69,0.58 42.7,0.59 42.69,0.66 42.66,0.7 42.62,0.71 42.61,0.77 42.55,0.75 42.53,0.73 42.5,0.73 42.47,0.7 42.44,0.71 42.39,0.75 42.35,0.76 42.25,0.74 42.17,0.7 42.12,0.7 42.08,0.68 42.03,0.65 41.96,0.58 41.97,0.55 41.97,0.47 41.99,0.47 42.03,0.44 42.07,0.41 42.06,0.35 42.06,0.32 42.16,0.33 42.17,0.3 42.23,0.28 42.22,0.19 42.24,0.15 42.25,0.1 42.28,0.11 42.3,0.07 42.3,0.01 42.26,0.01 42.26,-0.04 42.32,-0.04 42.36,-0.06 42.31,-0.14 42.3,-0.17 42.31,-0.22 42.34,-0.23 42.35,-0.36 42.34,-0.4 42.34,-0.47 42.36,-0.52 42.39,-0.58 42.39,-0.65 42.43,-0.65 42.48,-0.7 42.45,-0.73 42.46,-0.78 42.44,-0.85 42.46,-0.88 42.54,-0.92 42.59,-0.92 42.61,-0.9 42.66,-0.93 42.67,-0.89 42.7,-0.9 42.74,-0.9 + + AEMET-Meteoalerta zona + 622201 + + + + diff --git a/tests/input/large_left_hand_polygon.json b/tests/input/large_left_hand_polygon.json new file mode 100644 index 0000000..115ec98 --- /dev/null +++ b/tests/input/large_left_hand_polygon.json @@ -0,0 +1,1618 @@ +[ + [ + 0.120377, + 52.910765 + ], + [ + 0.157257, + 52.888518 + ], + [ + 0.179385, + 52.861807 + ], + [ + 0.231489, + 52.841335 + ], + [ + 0.294186, + 52.839107 + ], + [ + 0.371631, + 52.885864 + ], + [ + 0.430613, + 52.923667 + ], + [ + 0.504366, + 52.963666 + ], + [ + 0.552311, + 52.972552 + ], + [ + 0.728064, + 52.981439 + ], + [ + 0.827653, + 52.981444 + ], + [ + 1.037841, + 52.974777 + ], + [ + 1.188974, + 52.968101 + ], + [ + 1.380883, + 52.943686 + ], + [ + 1.557908, + 52.881414 + ], + [ + 1.661172, + 52.807907 + ], + [ + 1.723869, + 52.740975 + ], + [ + 1.768125, + 52.644859 + ], + [ + 1.797618, + 52.535074 + ], + [ + 1.797599, + 52.48345 + ], + [ + 1.786554, + 52.404768 + ], + [ + 1.749678, + 52.332709 + ], + [ + 1.701692, + 52.303412 + ], + [ + 1.668689, + 52.219106 + ], + [ + 1.660605, + 52.136954 + ], + [ + 1.587571, + 52.064631 + ], + [ + 1.506334, + 52.019712 + ], + [ + 1.381526, + 51.955304 + ], + [ + 1.275965, + 51.907744 + ], + [ + 1.300299, + 51.867657 + ], + [ + 1.30839, + 51.830043 + ], + [ + 1.25155, + 51.797419 + ], + [ + 1.206928, + 51.779845 + ], + [ + 1.125772, + 51.764775 + ], + [ + 1.044595, + 51.757238 + ], + [ + 0.991827, + 51.754726 + ], + [ + 0.971555, + 51.701927 + ], + [ + 0.967496, + 51.664175 + ], + [ + 0.951259, + 51.61379 + ], + [ + 0.918785, + 51.565872 + ], + [ + 0.845707, + 51.533059 + ], + [ + 0.765394, + 51.525526 + ], + [ + 0.68417, + 51.520473 + ], + [ + 0.708542, + 51.474963 + ], + [ + 0.761296, + 51.467381 + ], + [ + 0.818131, + 51.457264 + ], + [ + 0.866863, + 51.457264 + ], + [ + 0.919652, + 51.429422 + ], + [ + 0.956194, + 51.401563 + ], + [ + 1.074052, + 51.414213 + ], + [ + 1.216194, + 51.41168 + ], + [ + 1.313645, + 51.414216 + ], + [ + 1.463904, + 51.411684 + ], + [ + 1.545141, + 51.343239 + ], + [ + 1.504538, + 51.284853 + ], + [ + 1.436486, + 51.303401 + ], + [ + 1.428357, + 51.267839 + ], + [ + 1.424202, + 51.204289 + ], + [ + 1.424166, + 51.173753 + ], + [ + 1.399828, + 51.132986 + ], + [ + 1.322627, + 51.092202 + ], + [ + 1.229321, + 51.074308 + ], + [ + 1.164303, + 51.048795 + ], + [ + 1.107389, + 51.038602 + ], + [ + 1.062745, + 51.0156 + ], + [ + 1.018147, + 50.966995 + ], + [ + 1.014091, + 50.918368 + ], + [ + 0.904429, + 50.887632 + ], + [ + 0.806917, + 50.90046 + ], + [ + 0.717569, + 50.887649 + ], + [ + 0.579472, + 50.836383 + ], + [ + 0.453581, + 50.800448 + ], + [ + 0.400778, + 50.772203 + ], + [ + 0.299248, + 50.736228 + ], + [ + 0.173341, + 50.718231 + ], + [ + 0.067742, + 50.746509 + ], + [ + -0.009459, + 50.764507 + ], + [ + -0.11918, + 50.792782 + ], + [ + -0.20853, + 50.795352 + ], + [ + -0.318182, + 50.795354 + ], + [ + -0.439963, + 50.779916 + ], + [ + -0.561799, + 50.761931 + ], + [ + -0.703947, + 50.74137 + ], + [ + -0.824688, + 50.713334 + ], + [ + -0.966805, + 50.749322 + ], + [ + -1.035832, + 50.762171 + ], + [ + -1.056138, + 50.687616 + ], + [ + -1.129202, + 50.613018 + ], + [ + -1.246942, + 50.57178 + ], + [ + -1.413458, + 50.587186 + ], + [ + -1.49873, + 50.625839 + ], + [ + -1.539323, + 50.672191 + ], + [ + -1.604283, + 50.715921 + ], + [ + -1.661141, + 50.715914 + ], + [ + -1.750487, + 50.70562 + ], + [ + -1.868137, + 50.69281 + ], + [ + -1.908754, + 50.659355 + ], + [ + -1.916905, + 50.612987 + ], + [ + -2.05897, + 50.558872 + ], + [ + -2.233523, + 50.584672 + ], + [ + -2.359414, + 50.615585 + ], + [ + -2.420455, + 50.507201 + ], + [ + -2.542276, + 50.52269 + ], + [ + -2.566643, + 50.605226 + ], + [ + -2.692188, + 50.669619 + ], + [ + -2.757167, + 50.697928 + ], + [ + -2.870892, + 50.705679 + ], + [ + -3.012999, + 50.68769 + ], + [ + -3.163202, + 50.654187 + ], + [ + -3.276893, + 50.615516 + ], + [ + -3.358104, + 50.579445 + ], + [ + -3.414951, + 50.522687 + ], + [ + -3.427136, + 50.434816 + ], + [ + -3.455564, + 50.354557 + ], + [ + -3.556842, + 50.235844 + ], + [ + -3.76768, + 50.181627 + ], + [ + -3.901705, + 50.231024 + ], + [ + -3.970739, + 50.264783 + ], + [ + -4.060071, + 50.28554 + ], + [ + -4.194075, + 50.301098 + ], + [ + -4.348379, + 50.319267 + ], + [ + -4.555491, + 50.295912 + ], + [ + -4.677326, + 50.269958 + ], + [ + -4.762597, + 50.22062 + ], + [ + -4.884433, + 50.158215 + ], + [ + -4.965625, + 50.103563 + ], + [ + -5.042719, + 50.028008 + ], + [ + -5.15651, + 49.960078 + ], + [ + -5.286465, + 49.931329 + ], + [ + -5.34329, + 50.03579 + ], + [ + -5.420444, + 50.080112 + ], + [ + -5.627356, + 50.012381 + ], + [ + -5.777838, + 50.022734 + ], + [ + -5.798136, + 50.142604 + ], + [ + -5.69246, + 50.218038 + ], + [ + -5.550411, + 50.277747 + ], + [ + -5.379832, + 50.282941 + ], + [ + -5.253951, + 50.355541 + ], + [ + -5.140221, + 50.456481 + ], + [ + -5.046827, + 50.55978 + ], + [ + -4.859954, + 50.649966 + ], + [ + -4.734164, + 50.745156 + ], + [ + -4.644838, + 50.865779 + ], + [ + -4.571745, + 51.032075 + ], + [ + -4.470221, + 51.080573 + ], + [ + -4.364633, + 51.065266 + ], + [ + -4.291533, + 51.139218 + ], + [ + -4.198119, + 51.225778 + ], + [ + -3.991049, + 51.243606 + ], + [ + -3.808401, + 51.241075 + ], + [ + -3.548467, + 51.251205 + ], + [ + -3.28447, + 51.215598 + ], + [ + -3.093567, + 51.241021 + ], + [ + -3.008277, + 51.340065 + ], + [ + -2.963607, + 51.41864 + ], + [ + -2.837718, + 51.492024 + ], + [ + -2.675379, + 51.577893 + ], + [ + -2.598348, + 51.643432 + ], + [ + -2.943302, + 51.512247 + ], + [ + -3.065167, + 51.474317 + ], + [ + -3.211367, + 51.375566 + ], + [ + -3.455006, + 51.342602 + ], + [ + -3.694378, + 51.367955 + ], + [ + -3.808044, + 51.489435 + ], + [ + -3.887925, + 51.609244 + ], + [ + -3.997523, + 51.538599 + ], + [ + -4.23702, + 51.48556 + ], + [ + -4.35068, + 51.528512 + ], + [ + -4.334436, + 51.657118 + ], + [ + -4.431865, + 51.699914 + ], + [ + -4.549584, + 51.699914 + ], + [ + -4.756603, + 51.611771 + ], + [ + -4.955478, + 51.571415 + ], + [ + -5.146297, + 51.609252 + ], + [ + -5.259957, + 51.709976 + ], + [ + -5.280253, + 51.775326 + ], + [ + -5.345202, + 51.908248 + ], + [ + -5.215672, + 51.995804 + ], + [ + -5.093887, + 52.028295 + ], + [ + -4.870528, + 52.080705 + ], + [ + -4.781195, + 52.123092 + ], + [ + -4.59857, + 52.19538 + ], + [ + -4.39144, + 52.22017 + ], + [ + -4.245308, + 52.28486 + ], + [ + -4.188465, + 52.346859 + ], + [ + -4.127566, + 52.445971 + ], + [ + -4.139765, + 52.636247 + ], + [ + -4.135686, + 52.712497 + ], + [ + -4.147877, + 52.776431 + ], + [ + -4.188473, + 52.852491 + ], + [ + -4.273732, + 52.879432 + ], + [ + -4.375238, + 52.845116 + ], + [ + -4.456453, + 52.764101 + ], + [ + -4.545783, + 52.734607 + ], + [ + -4.635089, + 52.761661 + ], + [ + -4.752821, + 52.756755 + ], + [ + -4.817777, + 52.832863 + ], + [ + -4.675699, + 52.933307 + ], + [ + -4.537656, + 52.999333 + ], + [ + -4.367095, + 53.072572 + ], + [ + -4.460514, + 53.128653 + ], + [ + -4.598569, + 53.179786 + ], + [ + -4.720383, + 53.264872 + ], + [ + -4.69602, + 53.371598 + ], + [ + -4.559448, + 53.424615 + ], + [ + -4.35228, + 53.460913 + ], + [ + -4.185731, + 53.388293 + ], + [ + -4.096364, + 53.339813 + ], + [ + -3.962335, + 53.327664 + ], + [ + -3.852671, + 53.361608 + ], + [ + -3.641398, + 53.33739 + ], + [ + -3.438386, + 53.359177 + ], + [ + -3.357184, + 53.37613 + ], + [ + -3.2458, + 53.325782 + ], + [ + -3.194221, + 53.295084 + ], + [ + -3.091357, + 53.250647 + ], + [ + -3.112275, + 53.289393 + ], + [ + -3.150394, + 53.325821 + ], + [ + -3.192304, + 53.359948 + ], + [ + -3.213267, + 53.3895 + ], + [ + -3.142788, + 53.423568 + ], + [ + -3.068482, + 53.433785 + ], + [ + -3.03232, + 53.439447 + ], + [ + -2.950428, + 53.316702 + ], + [ + -2.876041, + 53.317853 + ], + [ + -2.923694, + 53.354255 + ], + [ + -3.015184, + 53.462134 + ], + [ + -3.06085, + 53.496172 + ], + [ + -3.110369, + 53.5347 + ], + [ + -3.077984, + 53.610504 + ], + [ + -3.045593, + 53.63875 + ], + [ + -2.994149, + 53.678269 + ], + [ + -2.954136, + 53.716623 + ], + [ + -3.047498, + 53.731278 + ], + [ + -3.114185, + 53.802228 + ], + [ + -3.08751, + 53.864071 + ], + [ + -3.070362, + 53.925823 + ], + [ + -3.017013, + 53.946012 + ], + [ + -2.898882, + 53.956103 + ], + [ + -2.917935, + 53.995324 + ], + [ + -2.94842, + 54.044577 + ], + [ + -2.862688, + 54.087056 + ], + [ + -2.830294, + 54.125042 + ], + [ + -2.856998, + 54.165168 + ], + [ + -2.925556, + 54.141793 + ], + [ + -3.013206, + 54.136195 + ], + [ + -3.104658, + 54.085937 + ], + [ + -3.178967, + 54.03115 + ], + [ + -3.295192, + 54.059118 + ], + [ + -3.287563, + 54.13843 + ], + [ + -3.373302, + 54.20871 + ], + [ + -3.453341, + 54.273285 + ], + [ + -3.468583, + 54.342208 + ], + [ + -3.560034, + 54.433184 + ], + [ + -3.624795, + 54.487443 + ], + [ + -3.649595, + 54.573695 + ], + [ + -3.605771, + 54.644319 + ], + [ + -3.579051, + 54.70486 + ], + [ + -3.527655, + 54.749954 + ], + [ + -3.476209, + 54.797214 + ], + [ + -3.447628, + 54.848807 + ], + [ + -3.394276, + 54.897047 + ], + [ + -3.291372, + 54.943031 + ], + [ + -3.194206, + 54.962729 + ], + [ + -3.352352, + 54.962733 + ], + [ + -3.453341, + 54.958358 + ], + [ + -3.537172, + 54.951792 + ], + [ + -3.552333, + 54.897035 + ], + [ + -3.594338, + 54.848807 + ], + [ + -3.710528, + 54.848807 + ], + [ + -3.824829, + 54.795023 + ], + [ + -3.91825, + 54.76315 + ], + [ + -4.091639, + 54.753255 + ], + [ + -4.219336, + 54.810395 + ], + [ + -4.320309, + 54.826861 + ], + [ + -4.331751, + 54.734562 + ], + [ + -4.343179, + 54.679518 + ], + [ + -4.453688, + 54.659678 + ], + [ + -4.579446, + 54.701538 + ], + [ + -4.628987, + 54.746655 + ], + [ + -4.714729, + 54.787328 + ], + [ + -4.815718, + 54.818079 + ], + [ + -4.857638, + 54.774141 + ], + [ + -4.842363, + 54.657489 + ], + [ + -4.842395, + 54.622187 + ], + [ + -5.019599, + 54.647552 + ], + [ + -5.061517, + 54.756552 + ], + [ + -5.126299, + 54.799411 + ], + [ + -5.187277, + 54.875127 + ], + [ + -5.202429, + 54.940839 + ], + [ + -5.185364, + 55.016301 + ], + [ + -5.080499, + 55.115559 + ], + [ + -4.966176, + 55.195034 + ], + [ + -4.905189, + 55.243942 + ], + [ + -4.861421, + 55.30905 + ], + [ + -4.851906, + 55.358903 + ], + [ + -5.156798, + 55.377314 + ], + [ + -5.52846, + 55.278343 + ], + [ + -5.719432, + 55.266769 + ], + [ + -5.894151, + 55.296854 + ], + [ + -5.833232, + 55.41233 + ], + [ + -5.784452, + 55.557387 + ], + [ + -5.983543, + 55.633149 + ], + [ + -6.300475, + 55.536709 + ], + [ + -6.418306, + 55.61251 + ], + [ + -6.686483, + 55.69504 + ], + [ + -6.507701, + 55.891487 + ], + [ + -6.324854, + 56.086945 + ], + [ + -6.389858, + 56.224985 + ], + [ + -6.499572, + 56.292692 + ], + [ + -6.674292, + 56.364781 + ], + [ + -6.938403, + 56.409767 + ], + [ + -7.035921, + 56.535446 + ], + [ + -6.905897, + 56.618256 + ], + [ + -6.568618, + 56.705324 + ], + [ + -6.341107, + 56.810033 + ], + [ + -6.532026, + 56.987493 + ], + [ + -6.8002, + 57.016261 + ], + [ + -7.169955, + 56.969779 + ], + [ + -7.324358, + 56.885522 + ], + [ + -7.555963, + 56.745413 + ], + [ + -7.804791, + 56.757823 + ], + [ + -7.642262, + 57.145596 + ], + [ + -7.597566, + 57.439799 + ], + [ + -7.646325, + 57.579486 + ], + [ + -7.520364, + 57.731656 + ], + [ + -7.260314, + 57.844285 + ], + [ + -7.252188, + 58.001805 + ], + [ + -7.179036, + 58.20148 + ], + [ + -6.951508, + 58.355304 + ], + [ + -6.667079, + 58.442597 + ], + [ + -6.309516, + 58.527554 + ], + [ + -5.708156, + 58.582669 + ], + [ + -5.257141, + 58.625001 + ], + [ + -4.513564, + 58.654608 + ], + [ + -3.908139, + 58.684184 + ], + [ + -3.550574, + 58.785408 + ], + [ + -3.538384, + 59.012085 + ], + [ + -2.953284, + 59.479532 + ], + [ + -2.254406, + 59.444435 + ], + [ + -2.307229, + 59.218529 + ], + [ + -2.494138, + 59.049679 + ], + [ + -2.640417, + 58.866117 + ], + [ + -2.898698, + 58.604119 + ], + [ + -2.979962, + 58.357713 + ], + [ + -3.309085, + 58.227444 + ], + [ + -3.608293, + 58.06323 + ], + [ + -3.831958, + 57.957666 + ], + [ + -3.711177, + 57.884124 + ], + [ + -3.837237, + 57.678171 + ], + [ + -3.475332, + 57.7672 + ], + [ + -2.991428, + 57.75852 + ], + [ + -2.442467, + 57.732478 + ], + [ + -1.910647, + 57.712297 + ], + [ + -1.67896, + 57.588325 + ], + [ + -1.699284, + 57.492338 + ], + [ + -1.817786, + 57.342919 + ], + [ + -1.929698, + 57.219257 + ], + [ + -1.998799, + 57.104646 + ], + [ + -2.169509, + 56.901052 + ], + [ + -2.242672, + 56.760902 + ], + [ + -2.409239, + 56.597457 + ], + [ + -2.620581, + 56.44725 + ], + [ + -2.71406, + 56.35954 + ], + [ + -2.523054, + 56.203867 + ], + [ + -2.84818, + 56.113336 + ], + [ + -3.11234, + 56.081602 + ], + [ + -3.155808, + 56.000875 + ], + [ + -2.505706, + 56.084843 + ], + [ + -2.233469, + 56.016769 + ], + [ + -1.89622, + 55.891653 + ], + [ + -1.623984, + 55.686045 + ], + [ + -1.579288, + 55.555265 + ], + [ + -1.542719, + 55.373286 + ], + [ + -1.420827, + 55.174228 + ], + [ + -1.347716, + 55.004487 + ], + [ + -1.299627, + 54.794175 + ], + [ + -1.100473, + 54.719192 + ], + [ + -0.90544, + 54.625154 + ], + [ + -0.661541, + 54.578103 + ], + [ + -0.401433, + 54.438887 + ], + [ + -0.251058, + 54.270726 + ], + [ + -0.121004, + 54.120937 + ], + [ + -0.169775, + 54.066116 + ], + [ + -0.149471, + 53.968218 + ], + [ + -0.002663, + 53.826926 + ], + [ + 0.129489, + 53.720291 + ], + [ + 0.20573, + 53.590765 + ], + [ + 0.073579, + 53.614893 + ], + [ + -0.076363, + 53.613386 + ], + [ + -0.208515, + 53.679669 + ], + [ + -0.058584, + 53.536426 + ], + [ + 0.05833, + 53.539447 + ], + [ + 0.24131, + 53.450248 + ], + [ + 0.350589, + 53.359344 + ], + [ + 0.401417, + 53.256085 + ], + [ + 0.386166, + 53.119034 + ], + [ + 0.312466, + 53.064091 + ], + [ + 0.24639, + 53.033537 + ], + [ + 0.187939, + 53.012136 + ], + [ + 0.124404, + 52.990725 + ], + [ + 0.081201, + 52.938681 + ], + [ + 0.055787, + 52.912636 + ], + [ + 0.120377, + 52.910765 + ] +] diff --git a/tests/output/circle_estimation.json b/tests/output/circle_estimation.json new file mode 100644 index 0000000..6b1f7da --- /dev/null +++ b/tests/output/circle_estimation.json @@ -0,0 +1,406 @@ +[ + [ + 12.0, + 3.0 + ], + [ + 11.98619, + 3.43953 + ], + [ + 11.9448, + 3.87733 + ], + [ + 11.87601, + 4.31167 + ], + [ + 11.78008, + 4.74083 + ], + [ + 11.6574, + 5.16312 + ], + [ + 11.50844, + 5.57687 + ], + [ + 11.33379, + 5.98046 + ], + [ + 11.13415, + 6.37228 + ], + [ + 10.9103, + 6.75079 + ], + [ + 10.66312, + 7.1145 + ], + [ + 10.39359, + 7.46197 + ], + [ + 10.10278, + 7.79183 + ], + [ + 9.79183, + 8.10278 + ], + [ + 9.46197, + 8.39359 + ], + [ + 9.1145, + 8.66312 + ], + [ + 8.75079, + 8.9103 + ], + [ + 8.37228, + 9.13415 + ], + [ + 7.98046, + 9.33379 + ], + [ + 7.57687, + 9.50844 + ], + [ + 7.16312, + 9.6574 + ], + [ + 6.74083, + 9.78008 + ], + [ + 6.31167, + 9.87601 + ], + [ + 5.87733, + 9.9448 + ], + [ + 5.43953, + 9.98619 + ], + [ + 5.0, + 10.0 + ], + [ + 4.56047, + 9.98619 + ], + [ + 4.12267, + 9.9448 + ], + [ + 3.68833, + 9.87601 + ], + [ + 3.25917, + 9.78008 + ], + [ + 2.83688, + 9.6574 + ], + [ + 2.42313, + 9.50844 + ], + [ + 2.01954, + 9.33379 + ], + [ + 1.62772, + 9.13415 + ], + [ + 1.24921, + 8.9103 + ], + [ + 0.8855, + 8.66312 + ], + [ + 0.53803, + 8.39359 + ], + [ + 0.20817, + 8.10278 + ], + [ + -0.10278, + 7.79183 + ], + [ + -0.39359, + 7.46197 + ], + [ + -0.66312, + 7.1145 + ], + [ + -0.9103, + 6.75079 + ], + [ + -1.13415, + 6.37228 + ], + [ + -1.33379, + 5.98046 + ], + [ + -1.50844, + 5.57687 + ], + [ + -1.6574, + 5.16312 + ], + [ + -1.78008, + 4.74083 + ], + [ + -1.87601, + 4.31167 + ], + [ + -1.9448, + 3.87733 + ], + [ + -1.98619, + 3.43953 + ], + [ + -2.0, + 3.0 + ], + [ + -1.98619, + 2.56047 + ], + [ + -1.9448, + 2.12267 + ], + [ + -1.87601, + 1.68833 + ], + [ + -1.78008, + 1.25917 + ], + [ + -1.6574, + 0.83688 + ], + [ + -1.50844, + 0.42313 + ], + [ + -1.33379, + 0.01954 + ], + [ + -1.13415, + -0.37228 + ], + [ + -0.9103, + -0.75079 + ], + [ + -0.66312, + -1.1145 + ], + [ + -0.39359, + -1.46197 + ], + [ + -0.10278, + -1.79183 + ], + [ + 0.20817, + -2.10278 + ], + [ + 0.53803, + -2.39359 + ], + [ + 0.8855, + -2.66312 + ], + [ + 1.24921, + -2.9103 + ], + [ + 1.62772, + -3.13415 + ], + [ + 2.01954, + -3.33379 + ], + [ + 2.42313, + -3.50844 + ], + [ + 2.83688, + -3.6574 + ], + [ + 3.25917, + -3.78008 + ], + [ + 3.68833, + -3.87601 + ], + [ + 4.12267, + -3.9448 + ], + [ + 4.56047, + -3.98619 + ], + [ + 5.0, + -4.0 + ], + [ + 5.43953, + -3.98619 + ], + [ + 5.87733, + -3.9448 + ], + [ + 6.31167, + -3.87601 + ], + [ + 6.74083, + -3.78008 + ], + [ + 7.16312, + -3.6574 + ], + [ + 7.57687, + -3.50844 + ], + [ + 7.98046, + -3.33379 + ], + [ + 8.37228, + -3.13415 + ], + [ + 8.75079, + -2.9103 + ], + [ + 9.1145, + -2.66312 + ], + [ + 9.46197, + -2.39359 + ], + [ + 9.79183, + -2.10278 + ], + [ + 10.10278, + -1.79183 + ], + [ + 10.39359, + -1.46197 + ], + [ + 10.66312, + -1.1145 + ], + [ + 10.9103, + -0.75079 + ], + [ + 11.13415, + -0.37228 + ], + [ + 11.33379, + 0.01954 + ], + [ + 11.50844, + 0.42313 + ], + [ + 11.6574, + 0.83688 + ], + [ + 11.78008, + 1.25917 + ], + [ + 11.87601, + 1.68833 + ], + [ + 11.9448, + 2.12267 + ], + [ + 11.98619, + 2.56047 + ], + [ + 12.0, + 3.0 + ] +] diff --git a/tests/output/tg_preprocessed.xml b/tests/output/tg_preprocessed.xml new file mode 100644 index 0000000..3501ad9 --- /dev/null +++ b/tests/output/tg_preprocessed.xml @@ -0,0 +1,81 @@ + + + + 86d1b8c2-135b-4472-b1d7-8278d2997ce5 + meteo_togo@yahoo.fr + 2024-06-06T15:15:00-00:00 + Actual + Alert + Public + + fr + Met + Rain/Wet Spell + Immediate + Severe + Observed + Médias + + Alerte + 019 + + 2024-06-06T17:00:00+00:00 + 2024-06-06T17:15:00+00:00 + 2024-06-06T22:00:00+00:00 + METEO TOGO (ANAMET) + L’analyse de l’évolution de l’image satellitaire à 15 h 15 du 06/06/2024 montre que le +système nuageux (voir image) dans son évolution pourrait entrainer des pluies modérées +à fortes dans les 2 heures de temps qui suivent dans les Plateaux et la Maritime ( Lomé +et ses environs). + Attention aux zones à risques d’inondations ! + https://www.anamet-togo.com/alertes/alerte-de-risque-de-pluie/ + 0022870277621 + + Plateaux + 8.379891,1.62681 8.392343,1.629622 8.403991,1.633237 8.410418,1.637254 8.413229,1.643681 8.417246,1.646091 8.424074,1.645287 8.427288,1.643279 8.43251,1.639664 8.43974,1.640869 8.455003,1.642877 8.467455,1.646091 8.469837,1.646401 8.47829,1.650547 8.478124,1.649922 8.47007,1.619587 8.455276,1.593833 8.449796,1.571093 8.448152,1.565065 8.442947,1.547257 8.440207,1.538489 8.439111,1.534105 8.438015,1.528078 8.437741,1.52479 8.436371,1.522872 8.433905,1.518489 8.431439,1.515749 8.428152,1.513009 8.40322,1.50068 8.394726,1.492461 8.392808,1.489995 8.389795,1.487803 8.384589,1.485063 8.382397,1.48342 8.377636,1.478475 8.375274,1.476022 8.371855,1.473129 8.371923,1.47279 8.368156,1.469366 8.365759,1.462859 8.363704,1.454982 8.361991,1.44642 8.361649,1.441968 8.361991,1.435118 8.362334,1.424502 8.362676,1.417995 8.363019,1.413542 8.362676,1.404981 8.360279,1.393336 8.358909,1.388884 8.355142,1.384775 8.354799,1.37861 8.354799,1.371418 8.351032,1.363884 8.351032,1.359432 8.351032,1.357377 8.359594,1.33854 8.358224,1.334773 8.358224,1.331006 8.358567,1.322444 8.357882,1.320047 8.363361,1.311143 8.366101,1.3108 8.365416,1.306005 8.364731,1.304978 8.366444,1.302238 8.365416,1.297786 8.365759,1.295046 8.366101,1.292649 8.366444,1.287855 8.367128,1.283745 8.367813,1.282032 8.372608,1.27758 8.372266,1.259429 8.372951,1.244703 8.37843,1.228949 8.378174,1.229067 8.361306,1.236826 8.359717,1.235369 8.357197,1.233059 8.353772,1.231004 8.350005,1.229634 8.346923,1.229292 8.34138,1.230831 8.340758,1.231004 8.330484,1.231004 8.325689,1.229634 8.301373,1.229292 8.295894,1.229976 8.289387,1.232374 8.287675,1.234086 8.283222,1.237511 8.277058,1.239223 8.27505,1.240084 8.273243,1.242707 8.269389,1.248719 8.265536,1.251493 8.260141,1.254576 8.254284,1.25735 8.249912,1.258702 8.246026,1.259903 8.245829,1.260182 8.244419,1.256117 8.242107,1.250877 8.239024,1.247023 8.237413,1.246026 8.234224,1.245547 8.227441,1.243851 8.220415,1.242883 8.216539,1.243367 8.210483,1.246274 8.204184,1.251846 8.201277,1.256207 8.199097,1.260325 8.193525,1.262748 8.186257,1.264443 8.177142,1.264336 8.165665,1.264201 8.157913,1.263717 8.153552,1.262748 8.151372,1.262263 8.146527,1.259356 8.142408,1.258629 8.135867,1.257176 8.132476,1.256449 8.123512,1.256207 8.114549,1.256449 8.106554,1.256207 8.103631,1.255476 8.102357,1.254641 8.099692,1.247858 8.099934,1.241317 8.098965,1.233807 8.095573,1.230416 8.09194,1.230416 8.091664,1.230788 8.087094,1.236956 8.085156,1.241559 8.082007,1.2481 8.07832,1.250703 8.074939,1.250998 8.069125,1.25221 8.05677,1.250998 8.051925,1.248576 8.049018,1.245911 8.040539,1.238643 8.037147,1.235736 8.032282,1.234763 8.031192,1.226591 8.032707,1.220913 8.033464,1.21675 8.0293,1.211829 8.025136,1.208043 8.024379,1.206151 8.015294,1.197445 8.000532,1.195552 7.989933,1.18571 7.985391,1.169812 7.972521,1.154292 7.966074,1.148562 7.965707,1.148236 7.961922,1.141801 7.957758,1.125146 7.957001,1.117575 7.955487,1.110383 7.954351,1.100542 7.952716,1.094654 7.952459,1.094485 7.950566,1.083887 7.949052,1.074423 7.949431,1.062689 7.949809,1.059282 7.95473,1.05209 7.958515,1.043762 7.960595,1.038468 7.962445,1.03376 7.962494,1.033198 7.964311,1.029867 7.964916,1.026839 7.96643,1.018057 7.967642,1.005339 7.971578,0.988986 7.974304,0.979296 7.978846,0.969908 7.980966,0.963246 7.976121,0.949316 7.974909,0.946288 7.971578,0.940838 7.967944,0.930844 7.964613,0.919034 7.964613,0.912675 7.961282,0.899048 7.96098,0.895111 7.959465,0.884512 8.02215,0.86816 8.03184,0.861801 8.035928,0.85317 8.038048,0.841058 8.038742,0.837123 8.016544,0.833532 8.013879,0.834501 8.006611,0.835228 8.002008,0.834259 7.998616,0.831594 7.993922,0.833878 7.98938,0.833121 7.983839,0.831109 7.978509,0.830625 7.974391,0.83014 7.972725,0.83085 7.968182,0.831606 7.962505,0.829714 7.957962,0.827821 7.953798,0.825929 7.948499,0.820629 7.942443,0.809274 7.938279,0.796025 7.932741,0.774565 7.932354,0.773065 7.933138,0.772542 7.937745,0.761223 7.939124,0.758463 7.942222,0.747622 7.943921,0.744672 7.943964,0.744538 7.943915,0.744471 7.943873,0.744453 7.943836,0.744471 7.943806,0.744495 7.943757,0.744507 7.943666,0.744495 7.943599,0.744386 7.945112,0.739433 7.946044,0.737103 7.947266,0.734354 7.949923,0.723063 7.950013,0.717291 7.951861,0.712645 7.958719,0.710099 7.964587,0.709532 7.963262,0.701393 7.961747,0.696472 7.959666,0.692876 7.955691,0.690037 7.951516,0.689687 7.947742,0.689659 7.942659,0.690565 7.936197,0.695147 7.921056,0.700068 7.902129,0.684927 7.897019,0.678681 7.893991,0.66619 7.893613,0.654077 7.893991,0.639693 7.893553,0.636246 7.890984,0.616015 7.890584,0.615846 7.884528,0.616224 7.880364,0.618117 7.880421,0.618174 7.859545,0.621902 7.836455,0.615846 7.831913,0.615468 7.824721,0.615846 7.814122,0.613953 7.797845,0.613575 7.789139,0.610546 7.786111,0.609033 7.778919,0.609411 7.77589,0.612439 7.772484,0.61471 7.769077,0.615846 7.761018,0.614381 7.760293,0.614052 7.757781,0.611899 7.752961,0.608284 7.744927,0.608284 7.732877,0.611497 7.711187,0.616317 7.711109,0.61673 7.70958,0.616317 7.70476,0.617522 7.701949,0.615916 7.705564,0.611096 7.706769,0.607882 7.707974,0.597037 7.70717,0.589807 7.676643,0.579765 7.671823,0.578962 7.648527,0.574142 7.632861,0.573339 7.626435,0.575749 7.621213,0.576954 7.616424,0.576954 7.614385,0.572134 7.608761,0.557673 7.607155,0.548435 7.600728,0.545222 7.599925,0.536787 7.594301,0.527548 7.587473,0.517908 7.571406,0.517506 7.558954,0.517506 7.545298,0.513088 7.524411,0.508268 7.518386,0.509072 7.515267,0.510007 7.514771,0.509875 7.502319,0.512686 7.491474,0.515097 7.491344,0.515616 7.490671,0.515498 7.483842,0.517105 7.476612,0.515498 7.472194,0.508268 7.463759,0.502243 7.454922,0.512686 7.448897,0.513892 7.451307,0.519515 7.446487,0.525138 7.432429,0.529155 7.418772,0.53036 7.416362,0.531967 7.409132,0.534778 7.398688,0.545624 7.397885,0.551649 7.390655,0.560485 7.387843,0.570527 7.387441,0.57856 7.389048,0.584987 7.392262,0.596234 7.39668,0.603865 7.402303,0.61471 7.4015,0.628367 7.397483,0.634794 7.393467,0.642426 7.393706,0.642388 7.393065,0.642828 7.38945,0.646041 7.375391,0.648049 7.37559,0.648616 7.371847,0.647729 7.366705,0.646123 7.359957,0.64548 7.350799,0.649979 7.347776,0.650402 7.334732,0.652228 7.328627,0.653192 7.31738,0.657048 7.311596,0.656084 7.302599,0.653835 7.281391,0.643231 7.280105,0.643231 7.270465,0.643231 7.249056,0.639649 7.22821,0.636161 7.200253,0.631662 7.179641,0.624894 7.178724,0.624593 7.170691,0.621059 7.165563,0.617408 7.149482,0.605956 7.132773,0.598244 7.121526,0.598244 7.116706,0.600172 7.110922,0.603385 7.09839,0.61174 7.095172,0.613119 7.092195,0.614395 7.08875,0.613346 7.080395,0.610455 7.07024,0.601251 7.070161,0.601093 7.066048,0.597186 7.059878,0.59554 7.058439,0.59554 7.042192,0.597391 7.033349,0.599036 7.030172,0.59949 7.028413,0.598831 7.023066,0.589782 7.020598,0.585874 7.017102,0.583201 7.005586,0.571273 7.000033,0.558934 6.999827,0.557494 6.986665,0.541659 6.981935,0.5359 6.978645,0.530965 6.978476,0.531294 6.978028,0.530348 6.974326,0.522738 6.970213,0.520888 6.968773,0.519859 6.966717,0.516569 6.948414,0.514718 6.93957,0.526235 6.937925,0.531787 6.936897,0.535078 6.936074,0.537546 6.935663,0.541453 6.933401,0.546183 6.922912,0.555232 6.914069,0.558111 6.907232,0.557775 6.901524,0.557494 6.887128,0.55153 6.880991,0.547337 6.879306,0.541756 6.876023,0.538985 6.872357,0.53765 6.870345,0.538357 6.869908,0.538749 6.863101,0.534859 6.854361,0.531806 6.850301,0.530617 6.850044,0.530226 6.842989,0.528015 6.825826,0.530121 6.825721,0.536755 6.82709,0.539071 6.825826,0.54423 6.827722,0.5476 6.825194,0.555286 6.821614,0.558972 6.821614,0.559182 6.813518,0.568291 6.813191,0.568659 6.81323,0.568675 6.8126,0.568888 6.807621,0.577823 6.80512,0.57914 6.798671,0.581246 6.79775,0.580719 6.799592,0.579403 6.801172,0.577297 6.803541,0.572427 6.803278,0.568873 6.799987,0.566504 6.791695,0.570189 6.786694,0.567628 6.786054,0.567012 6.783422,0.569776 6.778157,0.57175 6.771708,0.57096 6.770128,0.571224 6.765258,0.572277 6.76131,0.576488 6.762758,0.587676 6.760388,0.596758 6.753281,0.607419 6.754466,0.619001 6.754729,0.620581 6.753939,0.623739 6.748674,0.628872 6.748739,0.62892 6.74862,0.628944 6.74862,0.632646 6.748004,0.640049 6.745124,0.643751 6.741011,0.646219 6.726615,0.641283 6.712014,0.644779 6.701937,0.6419 6.692477,0.643751 6.674585,0.639638 6.667181,0.639227 6.650729,0.635319 6.640857,0.635936 6.63222,0.637787 6.628313,0.642929 6.620703,0.646013 6.614328,0.651566 6.610009,0.653211 6.606513,0.658558 6.611243,0.670897 6.606924,0.679946 6.598493,0.685293 6.598714,0.685993 6.597958,0.686036 6.592174,0.688285 6.583819,0.681216 6.578357,0.691177 6.580606,0.702746 6.584783,0.715599 6.585426,0.726845 6.577071,0.73745 6.570323,0.74002 6.553293,0.738092 6.536123,0.720157 6.533379,0.716624 6.530472,0.714139 6.527656,0.713168 6.52526,0.712954 6.523017,0.713189 6.519927,0.713765 6.516742,0.7183 6.517526,0.718738 6.517701,0.718835 6.518837,0.721501 6.519703,0.726417 6.519291,0.728527 6.519726,0.731617 6.521287,0.734843 6.522423,0.737227 6.523715,0.743266 6.5257,0.747053 6.52727,0.752387 6.527002,0.75534 6.526311,0.758014 6.525623,0.76125 6.526057,0.763919 6.528887,0.768123 6.532141,0.772748 6.53554,0.778356 6.541335,0.785499 6.546282,0.791522 6.550635,0.795734 6.551093,0.798389 6.550961,0.800358 6.551536,0.803448 6.550998,0.808933 6.551711,0.811179 6.552719,0.816657 6.554,0.820216 6.557951,0.823523 6.565767,0.828339 6.570401,0.830024 6.576359,0.83177 6.578545,0.832411 6.584162,0.832832 6.587391,0.833113 6.596097,0.8355 6.598765,0.837045 6.607892,0.839993 6.612666,0.841398 6.615194,0.842942 6.61928,0.845371 6.621526,0.846832 6.624222,0.849865 6.627143,0.853122 6.629502,0.85492 6.635343,0.857616 6.645802,0.861134 6.64665,0.861529 6.64697,0.861529 6.647064,0.861378 6.646989,0.861228 6.646998,0.861105 6.647081,0.861046 6.647228,0.860988 6.647493,0.860988 6.647876,0.861076 6.648524,0.8614 6.649819,0.862224 6.651498,0.863461 6.652587,0.864404 6.653795,0.865287 6.654796,0.865905 6.655503,0.8662 6.659561,0.86676 6.663597,0.867111 6.669039,0.868515 6.676586,0.870446 6.684133,0.872201 6.689926,0.872552 6.694665,0.874307 6.697824,0.877116 6.70151,0.8801 6.701635,0.881136 6.700552,0.884656 6.700783,0.887292 6.702126,0.893219 6.703014,0.90008 6.705452,0.900236 6.71204,0.899769 6.718411,0.899741 6.720498,0.899515 6.720642,0.899582 6.732226,0.900811 6.743459,0.900986 6.76066,0.899407 6.769436,0.8973 6.769987,0.896983 6.780837,0.909428 6.785142,0.916714 6.789191,0.923567 6.800117,0.937385 6.807829,0.951523 6.811685,0.961163 6.817147,0.964056 6.821054,0.963211 6.829037,0.961485 6.841569,0.961485 6.850245,0.960199 6.855804,0.960199 6.856495,0.962378 6.857104,0.976389 6.859611,0.984896 6.862134,0.99725 6.862439,1.004393 6.864692,1.018123 6.868853,1.027998 6.871072,1.033484 6.869987,1.036786 6.869355,1.036719 6.862687,1.051434 6.860293,1.05694 6.858108,1.060026 6.85373,1.064001 6.850014,1.068632 6.846727,1.070843 6.839509,1.079006 6.827918,1.092461 6.818482,1.095136 6.816519,1.09761 6.809446,1.104734 6.808442,1.121805 6.808033,1.122039 6.808042,1.122214 6.806302,1.126836 6.804788,1.132997 6.80041,1.13719 6.797776,1.13808 6.794056,1.141831 6.792988,1.149968 6.787749,1.15878 6.784905,1.162088 6.781612,1.16276 6.779865,1.165624 6.778121,1.169367 6.775706,1.169816 6.774403,1.173777 6.770247,1.178848 6.768719,1.181492 6.768087,1.188747 6.764366,1.192717 6.759117,1.199111 6.755177,1.203302 6.750139,1.207497 6.746641,1.212125 6.745994,1.215644 6.747107,1.219596 6.753283,1.225948 6.762307,1.230091 6.76936,1.23622 6.770911,1.239731 6.770036,1.240834 6.76916,1.241716 6.764774,1.24415 6.761725,1.251634 6.75868,1.260217 6.757607,1.267475 6.756177,1.274369 6.75601,1.27517 6.756673,1.275667 6.769114,1.284997 6.777007,1.293767 6.782638,1.301672 6.788408,1.309772 6.788708,1.311201 6.799655,1.326907 6.809234,1.339007 6.818735,1.351008 6.823756,1.368078 6.830785,1.384647 6.83681,1.405233 6.843663,1.410373 6.843086,1.421049 6.839069,1.43812 6.831538,1.456697 6.830032,1.470755 6.830095,1.471228 6.83204,1.485818 6.836559,1.499374 6.847605,1.519458 6.858651,1.53201 6.875219,1.542554 6.888776,1.548077 6.90183,1.556612 6.906851,1.569164 6.908859,1.5777 6.921914,1.576696 6.922085,1.576688 6.946516,1.575691 6.960574,1.567658 6.971118,1.559123 6.984674,1.559625 6.995218,1.557616 6.998024,1.557616 6.998007,1.557638 6.998,1.558156 6.997605,1.587361 6.994793,1.587361 6.99399,1.590976 6.99399,1.598207 6.995597,1.607445 6.99399,1.641587 7.067289,1.639772 7.075919,1.639399 7.12006,1.63776 7.125461,1.637513 7.125537,1.637574 7.128065,1.63756 7.197436,1.637173 7.205803,1.637615 7.205971,1.636071 7.205871,1.637574 7.246842,1.636771 7.247918,1.636537 7.262507,1.63637 7.323962,1.635968 7.345373,1.635968 7.391041,1.635968 7.400688,1.634919 7.416608,1.635652 7.468342,1.642079 7.485695,1.644007 7.492443,1.648184 7.494371,1.65429 7.494371,1.675498 7.497584,1.677426 7.501119,1.677105 7.506581,1.675498 7.513008,1.670356 7.515579,1.669071 7.518149,1.66875 7.52072,1.660074 7.521287,1.659254 7.535662,1.653004 7.542732,1.651398 7.548194,1.64947 7.558798,1.649148 7.613425,1.650755 7.641382,1.636938 7.661304,1.631475 7.675764,1.631154 7.676606,1.630903 7.711124,1.632158 7.731835,1.632785 7.796479,1.635924 7.810286,1.635296 7.826604,1.629647 7.852336,1.63153 7.886227,1.632158 7.896896,1.634041 7.903172,1.634041 7.917295,1.632717 7.917369,1.633639 7.920984,1.634041 7.95613,1.634844 7.991477,1.636049 8.299557,1.641271 8.300001,1.64114 8.30036,1.641271 8.327674,1.638057 8.339724,1.636852 8.343741,1.630426 8.351598,1.625318 8.357799,1.626007 8.367037,1.626007 8.379891,1.62681 + + + Maritime + 6.831861,1.599561 6.83839,1.60126 6.852814,1.601905 6.863784,1.595689 6.867558,1.594647 6.8734,1.596348 6.883388,1.606626 6.890591,1.603857 6.89712,1.605555 6.906047,1.605186 6.910131,1.592804 6.915938,1.582478 6.922085,1.576688 6.921914,1.576696 6.908859,1.5777 6.906851,1.569164 6.90183,1.556612 6.888776,1.548077 6.875219,1.542554 6.858651,1.53201 6.847605,1.519458 6.836559,1.499374 6.83204,1.485818 6.830095,1.471228 6.830032,1.470755 6.831538,1.456697 6.839069,1.43812 6.843086,1.421049 6.843663,1.410373 6.83681,1.405233 6.830785,1.384647 6.823756,1.368078 6.818735,1.351008 6.809234,1.339007 6.799655,1.326907 6.788708,1.311201 6.788408,1.309772 6.782638,1.301672 6.777007,1.293767 6.769114,1.284997 6.756673,1.275667 6.75601,1.27517 6.756177,1.274369 6.757607,1.267475 6.75868,1.260217 6.761725,1.251634 6.764774,1.24415 6.76916,1.241716 6.770036,1.240834 6.770911,1.239731 6.76936,1.23622 6.762307,1.230091 6.753283,1.225948 6.747107,1.219596 6.745994,1.215644 6.746641,1.212125 6.750139,1.207497 6.755177,1.203302 6.759117,1.199111 6.764366,1.192717 6.768087,1.188747 6.768719,1.181492 6.770247,1.178848 6.774403,1.173777 6.775706,1.169816 6.778121,1.169367 6.779865,1.165624 6.781612,1.16276 6.784905,1.162088 6.787749,1.15878 6.792988,1.149968 6.794056,1.141831 6.797776,1.13808 6.80041,1.13719 6.804788,1.132997 6.806302,1.126836 6.808042,1.122214 6.808033,1.122039 6.808442,1.121805 6.809446,1.104734 6.816519,1.09761 6.818482,1.095136 6.827918,1.092461 6.839509,1.079006 6.846727,1.070843 6.850014,1.068632 6.85373,1.064001 6.858108,1.060026 6.860293,1.05694 6.862687,1.051434 6.869355,1.036719 6.869987,1.036786 6.871072,1.033484 6.868853,1.027998 6.864692,1.018123 6.862439,1.004393 6.862134,0.99725 6.859611,0.984896 6.857104,0.976389 6.856495,0.962378 6.855804,0.960199 6.850245,0.960199 6.841569,0.961485 6.829037,0.961485 6.821054,0.963211 6.817147,0.964056 6.811685,0.961163 6.807829,0.951523 6.800117,0.937385 6.789191,0.923567 6.785142,0.916714 6.780837,0.909428 6.769987,0.896983 6.769436,0.8973 6.76066,0.899407 6.743459,0.900986 6.732226,0.900811 6.720642,0.899582 6.720498,0.899515 6.718411,0.899741 6.71204,0.899769 6.705452,0.900236 6.703014,0.90008 6.702126,0.893219 6.700783,0.887292 6.700552,0.884656 6.701635,0.881136 6.70151,0.8801 6.697824,0.877116 6.694665,0.874307 6.689926,0.872552 6.684133,0.872201 6.676586,0.870446 6.669039,0.868515 6.663597,0.867111 6.659561,0.86676 6.655503,0.8662 6.654796,0.865905 6.653795,0.865287 6.652587,0.864404 6.651498,0.863461 6.649819,0.862224 6.648524,0.8614 6.647876,0.861076 6.647493,0.860988 6.647228,0.860988 6.647081,0.861046 6.646998,0.861105 6.646989,0.861228 6.647064,0.861378 6.64697,0.861529 6.64665,0.861529 6.645802,0.861134 6.635343,0.857616 6.629502,0.85492 6.627143,0.853122 6.624222,0.849865 6.621526,0.846832 6.61928,0.845371 6.615194,0.842942 6.612666,0.841398 6.607892,0.839993 6.598765,0.837045 6.596097,0.8355 6.587391,0.833113 6.584162,0.832832 6.578545,0.832411 6.576359,0.83177 6.570401,0.830024 6.565767,0.828339 6.557951,0.823523 6.554,0.820216 6.552719,0.816657 6.551711,0.811179 6.550998,0.808933 6.551536,0.803448 6.550961,0.800358 6.551093,0.798389 6.550635,0.795734 6.546282,0.791522 6.541335,0.785499 6.53554,0.778356 6.532141,0.772748 6.528887,0.768123 6.526057,0.763919 6.525623,0.76125 6.526311,0.758014 6.527002,0.75534 6.52727,0.752387 6.5257,0.747053 6.523715,0.743266 6.522423,0.737227 6.521287,0.734843 6.519726,0.731617 6.519291,0.728527 6.519703,0.726417 6.518837,0.721501 6.517701,0.718835 6.517526,0.718738 6.513448,0.71859 6.507138,0.719716 6.501378,0.721115 6.48739,0.724472 6.485205,0.726953 6.478893,0.727804 6.461655,0.741332 6.441094,0.74856 6.43152,0.756837 6.43182,0.7626 6.422268,0.776092 6.415706,0.782434 6.404463,0.786051 6.400573,0.788361 6.398829,0.788863 6.396728,0.799058 6.395712,0.812465 6.394151,0.82373 6.389908,0.835006 6.386724,0.843061 6.374458,0.859731 6.364847,0.869957 6.337052,0.893121 6.321005,0.903908 6.322181,0.929634 6.322843,0.961259 6.322859,0.965548 6.323484,0.965482 6.322868,0.967692 6.324051,0.9961 6.306544,1.00212 6.306653,1.002435 6.30518,1.002743 6.243476,1.025619 6.239372,1.029751 6.234014,1.04056 6.23255,1.04144 6.228801,1.048658 6.220254,1.058295 6.180172,1.081424 6.172836,1.08475 6.170392,1.084511 6.168375,1.084979 6.164889,1.085507 6.162474,1.085881 6.158789,1.091168 6.158055,1.097268 6.157318,1.103399 6.156936,1.106573 6.157112,1.113849 6.157354,1.123899 6.15738,1.124968 6.156817,1.12921 6.156381,1.132491 6.15564,1.138075 6.15527,1.140861 6.154602,1.14589 6.155581,1.151079 6.15651,1.156009 6.156571,1.160243 6.156653,1.165897 6.154809,1.171182 6.154835,1.173687 6.154873,1.177377 6.1549,1.180055 6.154932,1.183149 6.154972,1.187072 6.154998,1.18963 6.155019,1.191649 6.151644,1.191658 6.147718,1.191668 6.144268,1.191677 6.139152,1.191691 6.134631,1.191703 6.129634,1.191716 6.126006,1.191726 6.121782,1.191737 6.119854,1.191742 6.117742,1.191748 6.116106,1.191752 6.114352,1.191757 6.112061,1.191763 6.109306,1.19177 6.109323,1.193268 6.109336,1.19437 6.109326,1.196371 6.109418,1.197632 6.10965,1.200155 6.109968,1.203702 6.110078,1.204031 6.112323,1.209181 6.113616,1.212544 6.114531,1.21421 6.114515,1.215045 6.115721,1.217407 6.116761,1.220334 6.117631,1.22227 6.118946,1.224121 6.119939,1.226752 6.120716,1.228605 6.121158,1.230292 6.121783,1.231264 6.122159,1.232056 6.123,1.234321 6.123026,1.236556 6.123383,1.237863 6.123899,1.239206 6.124254,1.240142 6.124394,1.240374 6.125235,1.241864 6.125538,1.243552 6.125768,1.244282 6.126016,1.244988 6.126332,1.246532 6.126871,1.248083 6.127452,1.249696 6.127629,1.250048 6.128621,1.252187 6.129545,1.253817 6.130247,1.255623 6.131246,1.25716 6.131984,1.258679 6.13255,1.261423 6.133095,1.26323 6.133637,1.264555 6.134274,1.266176 6.135089,1.268446 6.135447,1.269939 6.135672,1.270671 6.136422,1.273016 6.137081,1.275806 6.137605,1.276927 6.138112,1.278558 6.139009,1.280308 6.139841,1.282272 6.139963,1.282476 6.14113,1.284522 6.142372,1.286856 6.142684,1.288488 6.142474,1.289759 6.142496,1.2909 6.142824,1.292585 6.143305,1.29395 6.143791,1.295006 6.144597,1.297471 6.145384,1.299915 6.146256,1.302392 6.147212,1.305032 6.147907,1.307433 6.148459,1.308851 6.148834,1.310176 6.150157,1.314272 6.150601,1.315397 6.151336,1.317256 6.151985,1.319814 6.152452,1.320703 6.152975,1.321722 6.153687,1.323872 6.154108,1.324919 6.154662,1.326875 6.156086,1.330814 6.156582,1.332111 6.156788,1.332732 6.158325,1.337236 6.159204,1.339181 6.159655,1.340868 6.160262,1.342403 6.160703,1.345119 6.161014,1.345859 6.16176,1.347431 6.162602,1.349682 6.163475,1.352345 6.164441,1.35511 6.165405,1.357082 6.166153,1.359056 6.166812,1.362481 6.167131,1.365536 6.167784,1.367108 6.168848,1.371582 6.169532,1.372969 6.169938,1.374295 6.170664,1.376488 6.171316,1.380373 6.172751,1.384845 6.173407,1.387189 6.174155,1.389286 6.17516,1.392754 6.176232,1.396356 6.177046,1.399143 6.177389,1.404416 6.177904,1.406474 6.178333,1.407975 6.179276,1.41402 6.181848,1.430227 6.182234,1.432585 6.18232,1.433357 6.182313,1.433484 6.182365,1.433627 6.186294,1.456345 6.188047,1.468777 6.198868,1.500483 6.20454,1.533492 6.204993,1.542068 6.212763,1.558345 6.216276,1.587501 6.216737,1.587449 6.21663,1.587633 6.216934,1.589564 6.21967,1.60695 6.223301,1.619419 6.225702,1.627665 6.242409,1.629379 6.248396,1.648039 6.248436,1.648163 6.247608,1.668195 6.25432,1.680652 6.253729,1.68412 6.252761,1.689793 6.256729,1.694615 6.256766,1.709901 6.264567,1.736414 6.271279,1.749225 6.271842,1.764159 6.275194,1.769071 6.281878,1.770285 6.280892,1.799984 6.284425,1.80718 6.28636,1.807527 6.291015,1.805496 6.292412,1.801451 6.29363,1.795649 6.300133,1.791378 6.302759,1.789654 6.306822,1.797903 6.313505,1.798415 6.322464,1.795056 6.328788,1.792405 6.33194,1.78695 6.339139,1.782715 6.339846,1.784295 6.343898,1.787801 6.34988,1.789368 6.363936,1.785118 6.37395,1.781931 6.376405,1.779113 6.380258,1.772425 6.391682,1.770816 6.394152,1.774325 6.399239,1.769216 6.411547,1.769538 6.412792,1.775335 6.415782,1.775856 6.417553,1.77563 6.417558,1.777521 6.421302,1.780587 6.426797,1.780794 6.429423,1.776393 6.425898,1.772667 6.427198,1.764754 6.433554,1.757708 6.445193,1.753945 6.450466,1.753053 6.455084,1.75436 6.459697,1.75303 6.464087,1.750823 6.470885,1.744654 6.474831,1.740689 6.47438,1.736295 6.476352,1.733873 6.480977,1.737597 6.486026,1.735168 6.487552,1.73033 6.491944,1.72878 6.49612,1.72899 6.498533,1.727226 6.501826,1.725899 6.501598,1.722604 6.498518,1.721293 6.495437,1.719543 6.496529,1.716903 6.500254,1.712499 6.498926,1.708767 6.4976,1.705914 6.499132,1.703273 6.50043,1.695579 6.504603,1.69425 6.509657,1.694237 6.512961,1.696865 6.512975,1.702359 6.53627,1.701859 6.542847,1.695689 6.548129,1.698533 6.552299,1.696544 6.553398,1.696321 6.553595,1.68775 6.560618,1.683996 6.556196,1.673899 6.555968,1.670823 6.55794,1.6684 6.563429,1.666408 6.573009,1.674184 6.579606,1.675705 6.583119,1.674157 6.585526,1.670195 6.584187,1.662726 6.58154,1.658997 6.577796,1.65615 6.57888,1.650654 6.580839,1.643616 6.582811,1.641413 6.583085,1.641036 6.600499,1.636632 6.602687,1.633054 6.603219,1.627009 6.601282,1.621795 6.604844,1.618488 6.607584,1.616008 6.610871,1.612428 6.616641,1.612961 6.622404,1.610747 6.624875,1.610191 6.626793,1.608537 6.630349,1.603032 6.636941,1.603014 6.638879,1.608228 6.641635,1.611518 6.666337,1.603755 6.675373,1.593564 6.684154,1.590242 6.685496,1.579248 6.685706,1.577691 6.688854,1.573793 6.693806,1.576526 6.69327,1.581199 6.701522,1.584747 6.702909,1.589689 6.706213,1.592152 6.717198,1.591021 6.725994,1.59292 6.726014,1.600064 6.733729,1.608286 6.737866,1.614044 6.741453,1.61953 6.745578,1.620892 6.750789,1.618129 6.755466,1.620589 6.759647,1.624993 6.759826,1.625876 6.764623,1.622084 6.770421,1.608327 6.777633,1.60865 6.783474,1.610007 6.791382,1.61342 6.798244,1.611339 6.799954,1.608929 6.800611,1.598621 6.806443,1.596887 6.808337,1.597513 6.81263,1.59893 6.816765,1.604071 6.818837,1.608188 6.825381,1.61504 6.82881,1.613312 6.828462,1.611595 6.827066,1.603698 6.831861,1.599561 + + + + + + + + + + + + + BVfkeqCf6BLHjUWGc2Q2ezHFjH2c4SM1NJ4sVjbNb3U= + + + puzKsEURAsDQ6Kqa8tCZC79d82EGCSbZIr7+uDmYy1nLHgQIqD7ELiGbJbXB22ZYiYF12GmjvIrahi0VlkRnlg== + + + MIIDhzCCAwygAwIBAgISA+YrBrJ5OEcKOYecBMxg1mxaMAoGCCqGSM49BAMDMDIx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQDEwJF +NTAeFw0yNDA2MTQwODE2MDFaFw0yNDA5MTIwODE2MDBaMB4xHDAaBgNVBAMTE3d3 +dy5hbmFtZXQtdG9nby5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARsfcMu +DluFGkYL+5YA0FZpxUPauRrcRPCt8dru/BHI8cy/7KIlC1OXoLc0k1IBcUfHNSjG +3RjIYM/hJsiFAuSso4ICFDCCAhAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdJQQWMBQG +CCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBREt2YI +gb7hZcTuIy7sZjOVNV1C4DAfBgNVHSMEGDAWgBSfK1/PPCFPnQS37SssxMZwi9LX +DTBVBggrBgEFBQcBAQRJMEcwIQYIKwYBBQUHMAGGFWh0dHA6Ly9lNS5vLmxlbmNy +Lm9yZzAiBggrBgEFBQcwAoYWaHR0cDovL2U1LmkubGVuY3Iub3JnLzAeBgNVHREE +FzAVghN3d3cuYW5hbWV0LXRvZ28uY29tMBMGA1UdIAQMMAowCAYGZ4EMAQIBMIIB +AwYKKwYBBAHWeQIEAgSB9ASB8QDvAHYAPxdLT9ciR1iUHWUchL4NEu2QN38fhWrr +wb8ohez4ZG4AAAGQFghM0AAABAMARzBFAiBVVo8FIlGNA4etMHwUErt2o5dQoEXx +yJgaz/Kk7l76ywIhAPcJP9sD9i6WG3VfnyCSxbnwhIciZgzthXyTNCoBONjuAHUA +GZgQcQnw1lIuMIDSnj9ku4NuKMz5D1KO7t/OSj8WtMoAAAGQFghM0QAABAMARjBE +AiBkmfjeqRAwvf5FTAuPYhdvKJ0EybuWSs1LDnhTB9oyyAIgUbxZxFvZq37hRQ+q +O6MGOccBGTmOAeHAP9/o+zWzKeUwCgYIKoZIzj0EAwMDaQAwZgIxAOZBoLRNHVTd +EPJNewQvAsoTFHmhVJb+fhWOoOYdLweJLp8FB4YE7NNE1x3Gw5r+awIxAPZP3z4d +/iKLT91HIkuKPEFlKcclNWkJjjU+LO3pV4JKubK0q48Fbial6/P11GSQ9w== + + + + + diff --git a/tests/test_cap2geojson.py b/tests/test_cap2geojson.py index fb90f1a..7d1abeb 100644 --- a/tests/test_cap2geojson.py +++ b/tests/test_cap2geojson.py @@ -19,15 +19,15 @@ # ############################################################################### +import json import logging import pytest +import time from cap2geojson.convert import ( - get_properties, get_circle_coords, ensure_counter_clockwise, get_polygon_coordinates, - get_geometry, preprocess_alert, to_geojson, ) @@ -46,3 +46,100 @@ def test_to_geojson(sc_alert): expected = f.read() assert to_geojson(sc_alert) == expected + + +@pytest.fixture +def circle(): + return { + "x_centre": 5.0, + "y_centre": 3.0, + "radius": 7.0, + } + + +def test_circle_coords(circle): + assert list(get_circle_coords( + circle["x_centre"], circle["y_centre"], circle["radius"], 10 + )) == [ + [12.0, 3.0], + [10.66312, 7.1145], + [7.16312, 9.6574], + [2.83688, 9.6574], + [-0.66312, 7.1145], + [-2.0, 3.0], + [-0.66312, -1.1145], + [2.83688, -3.6574], + [7.16312, -3.6574], + [10.66312, -1.1145], + [12.0, 3.0], + ] + + +@pytest.fixture +def circle_area(): + return { + "circle": "5.0,3.0 7.0", + } + + +def test_estimate_polygon(circle_area): + with open("tests/output/circle_estimation.json", "r") as f: + expected = json.load(f) + assert get_polygon_coordinates(circle_area) == expected + + +@pytest.fixture +def small_left_hand_polygon(): + return [[1.0, 1.0], [1.0, 2.0], [2.0, 2.0], [2.0, 1.0]] + + +@pytest.fixture +def small_right_hand_polygon(): + return [[61.0, -8.4], [50.4, 7.8], [50.8, -12.7], [61.0, -8.4]] + + +def test_make_right_hand(small_left_hand_polygon): + original = small_left_hand_polygon.copy() + result = ensure_counter_clockwise(small_left_hand_polygon) + assert result == original[::-1] + + +def test_keep_right_hand(small_right_hand_polygon): + original = small_right_hand_polygon.copy() + result = ensure_counter_clockwise(small_right_hand_polygon) + assert original == result + + +@pytest.fixture +def large_left_hand_polygon(): + with open("tests/input/large_left_hand_polygon.json", "r") as f: + return json.load(f) + + +def test_make_large_left_hand(large_left_hand_polygon): + original = large_left_hand_polygon.copy() + start_time = time.time() + result = ensure_counter_clockwise(large_left_hand_polygon) # noqa + end_time = time.time() + + assert result == original[::-1] + assert end_time - start_time < 1.0 + + +@pytest.fixture +def xml_with_cap_tags(): + with open("tests/input/tg.xml", "r", encoding="utf-8") as f: + return f.read() + + +@pytest.fixture +def xml_without_cap_tags(): + with open("tests/input/es.xml", "r", encoding="utf-8") as f: + return f.read() + + +def test_preprocessing(xml_with_cap_tags, xml_without_cap_tags): + with open("tests/output/tg_preprocessed.xml", "r", encoding="utf-8") as f: + expected = f.read() + assert preprocess_alert(xml_with_cap_tags) == expected + assert preprocess_alert(xml_without_cap_tags) == xml_without_cap_tags