# 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)
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
def connect_to_DYCAST(self): dycast.read_config(config_file) dycast.init_db() dycast.init_logging()