# Helper functions which tests the functionality of this block.


def testConnection():
    from OSMHandler.ConnectionHandlerObj import ConnectionHandler
    conHand = ConnectionHandler()
    [vec_a, _] = conHand.query_location(location=[14.4310467875143, 50.0631591705215], radius=10)
    [vec_b, _] = conHand.query_location(location=[14.4310467875143, 50.0631591705215], radius=100)

    print len(vec_a), vec_a
    print len(vec_b), vec_b


def testCheckingSegments():
    import OSMHandler.Checker as Checker
    import OSMHandler.Marker as Marker
    import Downloader.DataOperations

    #path_to_segments_file = '/home/ekmek/Desktop/Project II/MGR-Project-Code/Data/StreetViewData/50_rewritingObj_299x299/SegmentsData.dump'
    #path_to_segments_file = '/home/ekmek/Desktop/Project II/MGR-Project-Code/Data/StreetViewData/50_rewritingObj_299x299/SegmentsData_marked.dump'
    path_to_segments_file = '/home/ekmek/Vitek/MGR-Project-Code/Data/StreetViewData/tmp_one/SegmentsData.dump'
    Segments = Downloader.DataOperations.LoadDataFile(path_to_segments_file)

    #Segments = Segments[0:3]
    radius = 100

    allright = Checker.Check(Segments)
    print "checks out as ", allright
    if not allright:
        Marker.Mark(Segments, radius = radius)

        Marker.closeConnection()

    allright = Checker.Check(Segments)
    print "checks out as ", allright

    path2 = '/home/ekmek/Vitek/MGR-Project-Code/Data/StreetViewData/tmp_one/SegmentsData_marked.dump'
    Segments = Downloader.DataOperations.SaveDataFile(path2, Segments)


testCheckingSegments()

@@ -948,39 +948,54 @@
 /StreetViewData/
-tmp_one
+1200x_markable_640x640
 /SegmentsData.du
@@ -1452,15 +1452,30 @@
 ata/
-tmp_one
+1200x_markable_640x640
 /Seg
@@ -1482,32 +1482,37 @@
 mentsData_marked
+_R100
 .dump'%0A    Segme

Mark new dataset