Esempio n. 1
0
# date (MM/DD/YYYY)
# long (decimal degrees)
# lat (decimal degrees)
# species

import dycast
import optparse

usage = "usage: %prog [options] datafile.tsv"
p = optparse.OptionParser(usage)
p.add_option('--config',
             '-c',
             default="./dycast.config",
             help="load config file FILE",
             metavar="FILE")
options, arguments = p.parse_args()

config_file = options.config

dycast.read_config(config_file)

dycast.init_logging()

dycast.init_db()

# If arguments includes multiple filenames, fileinput will handle them all

for file in arguments:
    (lines_read, lines_processed, lines_loaded,
     lines_skipped) = dycast.load_bird_file(file)
Esempio n. 2
0
p.add_option('--closespace')
p.add_option('--closetime')
p.add_option('--spatialdomain')
p.add_option('--temporaldomain')

options, arguments = p.parse_args()

config_file = options.config

try:
    dycast.read_config(config_file)
except:
    print "could not read config file:", config_file
    sys.exit()

dycast.init_logging()

dycast.init_db()

(default_cs, default_ct, default_sd, default_td) = dycast.get_default_parameters()

if options.closespace:
  cs = options.closespace
else:
  cs = default_cs
if options.closetime:
  ct = options.closetime
else:
  ct = default_ct
if options.spatialdomain:
  sd = options.spatialdomain
Esempio n. 3
0
 def connect_to_DYCAST(self):
     dycast.read_config(config_file)
     dycast.init_db()
     dycast.init_logging()
Esempio n. 4
0
File: ui.py Progetto: almccon/DYCAST
 def connect_to_DYCAST(self):
     dycast.read_config(config_file)
     dycast.init_db()
     dycast.init_logging()