Пример #1
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-o",
                            "--overwrite",
                            help="Overwrite existing files",
                            action="store_true",
                            dest="overwrite_flag")
Пример #2
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-f",
                            "--force",
                            help="Force removal, don't check with user",
                            action="store_true",
                            dest="force_flag")
Пример #3
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-o","--overwrite",
             help="Overwrite existing files",
             action="store_true",
             dest="overwrite_flag")
     self.parser.add_option("-n","--remove-null",
             help="Remove null bitmasks from raster maps",
             action="store_true",
             dest="remove_null")
     self.parser.add_option("-g","--generate",
             help="Generate null bitmasks for raster maps",
             action="store_true",
             dest="generate_null")
     self.parser.add_option("-c","--check-maps",
             help="Check all maps for the model are present",
             action="store_true",
             dest="check_maps")
     self.parser.add_option("-m","--move-mapset",
             help="Move model to a new mapset",
             action="store",
             type="string",
             dest="move_mapset")
     self.parser.add_option("-l","--list-instances",
             help="List all the instances, their index, and status",
             action="store_true",
             dest="list_instances")
     self.parser.add_option("-t","--toggle-instance",
             help="Change the whether instances are enabled or not",
             action="store",
             dest="toggle_instances")
Пример #4
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option(
         "-c",
         "--complete",
         help="check if model is complete and all maps exist",
         action="store_true",
         dest="complete_flag")
Пример #5
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-f","--force",
             help="Don't prompt first",
             action="store_true",
             dest="force")
     self.parser.add_option("-s","--soft",
             help="Do a soft reset, just forget replicates and reuse mapsets.",
             action="store_true",
             dest="soft")
Пример #6
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-o","--overwrite",
             help="Overwrite existing files",
             action="store_true",
             dest="overwrite_flag")
     self.parser.add_option("-g","--gif",
             help="Output animated gif",
             action="store_true",
             dest="output_gif")
     self.parser.add_option("-i","--image",
             help="Output a series of images, one for each population distribution map",
             action="store_true",
             dest="output_image")
     self.parser.add_option("-m","--mappack",
             help="Output a zip file with exported maps",
             action="store_true",
             dest="output_map_pack")
     self.parser.add_option("-p","--rep",
             help="Output maps for rep instead of for occupancy envelope",
             action="append",
             type="int",
             dest="reps")
     self.parser.add_option("-l","--lifestage",
             help="Lifestage to analyse (lifestage name or default='all')",
             action="store",
             dest="output_lifestage",
             type="string")
     self.parser.add_option("-j","--instance",
             help="Export only instances specified (export all by default)",
             action="append",
             type="int",
             dest="instances")
     self.parser.add_option("-b","--background",
             help="Rast map to overlay pop. distributions on.",
             action="store",
             dest="background",
             type="string")
     self.parser.add_option("-x","--width",
             help="Set width of output image.",
             action="store",
             type="int",
             dest="width")
     self.parser.add_option("-y","--height",
             help="Set height of output image.",
             action="store",
             type="int",
             dest="height")
     self.parser.add_option("-d","--dir",
             help="Output dir to export to (default is model_mapset/mdig/output)",
             action="store",
             dest="outdir",
             type="string")
Пример #7
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-f",
                            "--force",
                            help="Don't prompt first",
                            action="store_true",
                            dest="force")
     self.parser.add_option(
         "-s",
         "--soft",
         help="Do a soft reset, just forget replicates and reuse mapsets.",
         action="store_true",
         dest="soft")
Пример #8
0
 def act_on_options(self, options):
     Action.act_on_options(self, options)
     c = config.get_config()
     c.overwrite_flag = self.options.overwrite_flag
     if self.options.output_lifestage is None:
         self.options.output_lifestage = "all"
     if self.options.width is None:
         self.options.width = c["OUTPUT"]["output_width"]
     if self.options.height is None:
         self.options.height = c["OUTPUT"]["output_height"]
     if self.options.background is None:
         self.options.background = c["OUTPUT"]["background_map"]
     if self.options.outdir is not None:
         if not os.path.isdir(self.options.outdir):
             sys.exit("No such output dir: %s" % self.options.outdir)
Пример #9
0
 def act_on_options(self,options):
     Action.act_on_options(self,options)
     c = config.get_config()
     c.overwrite_flag = self.options.overwrite_flag
     if self.options.output_lifestage is None:
         self.options.output_lifestage = "all"
     if self.options.width is None:
         self.options.width = c["OUTPUT"]["output_width"]
     if self.options.height is None:
         self.options.height = c["OUTPUT"]["output_height"]
     if self.options.background is None:
         self.options.background = c["OUTPUT"]["background_map"]
     if self.options.outdir is not None:
         if not os.path.isdir(self.options.outdir):
             sys.exit("No such output dir: %s" % self.options.outdir)
Пример #10
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-o",
                            "--overwrite",
                            help="Overwrite existing files",
                            action="store_true",
                            dest="overwrite_flag")
     self.parser.add_option("-n",
                            "--remove-null",
                            help="Remove null bitmasks from raster maps",
                            action="store_true",
                            dest="remove_null")
     self.parser.add_option("-g",
                            "--generate",
                            help="Generate null bitmasks for raster maps",
                            action="store_true",
                            dest="generate_null")
     self.parser.add_option("-c",
                            "--check-maps",
                            help="Check all maps for the model are present",
                            action="store_true",
                            dest="check_maps")
     self.parser.add_option("-m",
                            "--move-mapset",
                            help="Move model to a new mapset",
                            action="store",
                            type="string",
                            dest="move_mapset")
     self.parser.add_option(
         "-l",
         "--list-instances",
         help="List all the instances, their index, and status",
         action="store_true",
         dest="list_instances")
     self.parser.add_option(
         "-t",
         "--toggle-instance",
         help="Change the whether instances are enabled or not",
         action="store",
         dest="toggle_instances")
Пример #11
0
 def add_options(self):
     Action.add_options(self)
Пример #12
0
 def parse_options(self, argv):
     (self.options, args) = self.parser.parse_args(argv[1:])
     Action.act_on_options(self, self.options)
Пример #13
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-o","--overwrite",
             help="Overwrite existing files",
             action="store_true",
             dest="overwrite_flag")
Пример #14
0
 def act_on_options(self, options):
     Action.act_on_options(self, options)
     config.get_config().overwrite_flag = self.options.overwrite_flag
Пример #15
0
 def act_on_options(self,options):
     Action.act_on_options(self,options)
     config.get_config().overwrite_flag = self.options.overwrite_flag
Пример #16
0
 def act_on_options(self, options):
     Action.act_on_options(self, options)
Пример #17
0
 def act_on_options(self,options):
     Action.act_on_options(self,options)
Пример #18
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-c","--complete",
             help="check if model is complete and all maps exist",
             action="store_true",
             dest="complete_flag")
Пример #19
0
 def parse_options(self,argv):
     (self.options, args) = self.parser.parse_args(argv[1:])
     Action.act_on_options(self,self.options)
Пример #20
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-f","--force",
             help="Force removal, don't check with user",
             action="store_true",
             dest="force_flag")
Пример #21
0
 def add_options(self):
     Action.add_options(self)
Пример #22
0
 def add_options(self):
     Action.add_options(self)
     self.parser.add_option("-o",
                            "--overwrite",
                            help="Overwrite existing files",
                            action="store_true",
                            dest="overwrite_flag")
     self.parser.add_option("-g",
                            "--gif",
                            help="Output animated gif",
                            action="store_true",
                            dest="output_gif")
     self.parser.add_option(
         "-i",
         "--image",
         help=
         "Output a series of images, one for each population distribution map",
         action="store_true",
         dest="output_image")
     self.parser.add_option("-m",
                            "--mappack",
                            help="Output a zip file with exported maps",
                            action="store_true",
                            dest="output_map_pack")
     self.parser.add_option(
         "-p",
         "--rep",
         help="Output maps for rep instead of for occupancy envelope",
         action="append",
         type="int",
         dest="reps")
     self.parser.add_option(
         "-l",
         "--lifestage",
         help="Lifestage to analyse (lifestage name or default='all')",
         action="store",
         dest="output_lifestage",
         type="string")
     self.parser.add_option(
         "-j",
         "--instance",
         help="Export only instances specified (export all by default)",
         action="append",
         type="int",
         dest="instances")
     self.parser.add_option(
         "-b",
         "--background",
         help="Rast map to overlay pop. distributions on.",
         action="store",
         dest="background",
         type="string")
     self.parser.add_option("-x",
                            "--width",
                            help="Set width of output image.",
                            action="store",
                            type="int",
                            dest="width")
     self.parser.add_option("-y",
                            "--height",
                            help="Set height of output image.",
                            action="store",
                            type="int",
                            dest="height")
     self.parser.add_option(
         "-d",
         "--dir",
         help=
         "Output dir to export to (default is model_mapset/mdig/output)",
         action="store",
         dest="outdir",
         type="string")