function res=plot_primary(P,db_file)
    p_idx=P(1);
    sql="SELECT * FROM images WHERE  %d<= cnt_id AND cnt_id<%d ;";
    sql=sprintf(sql,P(2),P(3));
    conn=sqlite(db_file);
    res=fetch(conn,sql);
    close(conn);
    lalo_p=rowfun(@(x,y) [jsondecode(x),jsondecode(y)], res(:,["lat","lon"]),'OutputFormat', 'cell');
    lalo=cell2mat(lalo_p);
    figure(1);
    h=geoplot(lalo(:,1),lalo(:,2),'x'); 
    hold on;
end