Пример #1
0
 def generate_multi_borders(self, db, out_file, smooth, scales):
     if len(scales) == 0:
         scales = self.percent_range()
     print('Using scales: %s' % scales)
     files = [self.comm_path(i, False) for i in scales]
     b = Borders(db, smooth)
     b.process_multi(files, scales, out_file)
Пример #2
0
def borders(ctx):
    dbname = ctx.obj["dbname"]
    db = DB(dbname, ctx.obj["config"])
    db.open()
    indir = ctx.obj["indir"]
    infile = ctx.obj["infile"]
    outfile = ctx.obj["outfile"]
    smooth = ctx.obj["smooth"]
    bs = Borders(db, smooth)
    bs.process(indir, infile, outfile)
Пример #3
0
def borders(ctx):
    dbname = ctx.obj['dbname']
    db = DB(dbname, ctx.obj['config'])
    db.open()
    indir = ctx.obj['indir']
    infile = ctx.obj['infile']
    outfile = ctx.obj['outfile']
    smooth = ctx.obj['smooth']
    bs = Borders(db, smooth)
    bs.process(indir, infile, outfile)
Пример #4
0
 def generate_borders(self, db, best, smooth):
     bord = Borders(db, smooth)
     for per_dist in self.percent_range():
         bord_file = self.bord_path(per_dist)
         if best:
             comm_file = self.comm_path(per_dist, False)
             bord.process(None, comm_file, bord_file)
         else:
             comm_dir = self.comm_path(per_dist, True)
             bord.process(comm_dir, None, bord_file)