示例#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)
示例#2
0
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
else:
  sd = default_sd
示例#3
0
文件: ui.py 项目: sdwfrost/DYCAST
 def connect_to_DYCAST(self):
     dycast.read_config(config_file)
     dycast.init_db()
     dycast.init_logging()
示例#4
0
文件: ui.py 项目: almccon/DYCAST
 def connect_to_DYCAST(self):
     dycast.read_config(config_file)
     dycast.init_db()
     dycast.init_logging()