Exemplo n.º 1
0
    def test_gpx_file_Loading_2(self):
        test_file = GPXTrackRepository()
        parsed_file = test_file.read("../../rutaTramuntana.gpx")

        for p in parsed_file:
            plt.scatter(p.get_longitude(), p.get_latitude(), c="blue")
        plt.show()
Exemplo n.º 2
0
 def test_viterbi_algorithm(self):
     bellver_graph = Graph(39.5713, 39.5573, 2.6257, 2.6023)
     gpx_resource = GPXResourceImpl()
     points = gpx_resource.read('./../../data/tracks_to_analysis/activity_3584116575.gpx')
     hidden_markov_model = HMM(graph=bellver_graph)
     get_map_matching = GetMapMatchingImpl(hidden_markov_model)
     result = get_map_matching.match(points)
     bellver_graph.plot_graph()
     for p in points:
         plt.scatter(p.get_longitude(), p.get_latitude(), c="red")
     for r in result:
         plt.scatter(r[0].get_longitude(), r[0].get_latitude(), c="green")
         print(r)
     plt.show()
     self.assertEqual(True, True)
Exemplo n.º 3
0
 def test_gpx_file_Loading(self):
     test_file = GPXTrackRepository()
     parsed_file = test_file.read(
         "tracks/Ficheros/RutasSegmentadas/RutaCastilloBellver1.gpx")
     self.assertEqual(len(parsed_file), 4)