U
    d                     @   sl   d Z ddlZddlmZ ddlZddlmZ ddlmZ	 ddl
mZ eefdddZed	krhe \ZZdS )
a   
function [rtree_idx,timeGeoList] = get_historic_missions()
%GET_HISTORIC_MISSIONS Summary of this function goes here
%   Detailed explanation goes here
        mission_list=uigetdir2('/mnt/m/pipe/timgs/sonobot-generic', ...
                            'Select mission directories');
        py.importlib.import_module('rtree');
        rtree_idx=py.rtree.index.Index('mission');
        timeGeoList=[];
        for directory = mission_list
            [rtree_idx,timeGeoList]=read_timeGeo(rtree_idx,timeGeoList,directory{1});
        end

end
    N)index)read_timeGeo)	dbs_class)returnc                  C   sp   ddg} t d t }t dtj  ttjj}g }| D ]&}t d|  t||||\}}q@||fS )Nz*/mnt/m/pipe/timgs/sonobot-generic/20230324z*/mnt/m/pipe/timgs/sonobot-generic/20230327zCreating r-treezCreating db for z
selected: )	loggingdebugr   ZIndexglargsr   dbr   )Zdir_list	rtree_idxr
   timeGeoListZ	directory r   ?/home/isk/software/changedetection/src/get_historic_missions.pyget_historic_missions   s    
r   __main__)__doc__r   Zrtreer   ZglobZsrc.read_timeGeor   src.global_settingsglobal_settingsr   Zsrc.db_skeletonr   listr   __name__r   r   r   r   r   r   <module>   s   