Exemplo n.º 1
0
def filter_trajectories():
    print "Entered function to filter trajectories: BEEF"
    unfiltered = model_datastore.get_all_location_updates()
    filtered_trajectories = \
    model_datastore.filter_trajectories(trajectories=unfiltered)
    model_datastore.store_filtered_trajectories(filtered_trajectories=filtered_trajectories)
    return
Exemplo n.º 2
0
def run_the_whole_enchilada(epsilon, min_neighbors, min_num_trajectories_in_cluster, \
                            min_vertical_lines, min_prev_dist): 
    all_raw_point_lists = get_normalized_datastore_trajectories()   
    print "HERE ARE THE POINT LISTS WERE PASSING IN TO TRACLUS: " + str(all_raw_point_lists)
        
    print "ABOUT to run the whole enchilada with a min neighbors of " + str(min_neighbors)
    result_trajectories = the_whole_enchilada(point_iterable_list=all_raw_point_lists, \
                        epsilon=epsilon, \
                        min_neighbors=min_neighbors, \
                        min_num_trajectories_in_cluster=min_num_trajectories_in_cluster, \
                        min_vertical_lines=min_vertical_lines, \
                        min_prev_dist=min_prev_dist, \
                        partitioned_points_hook=model_datastore.store_partitioned_trajectories, \
                        clusters_hook=model_datastore.store_clusters)
    
    if len(result_trajectories) == 0:
        raise ValueError("length of resulting trajectories is " + str(len(result_trajectories)))
    
    model_datastore.store_filtered_trajectories(filtered_trajectories=result_trajectories)