def setup_arguments(self): # Call method on super class # super(self.__class__, self).setup_arguments() CellTool.setup_arguments(self) self.parser.add_argument("--dataset-type", help="The type(s) of dataset to retrieve", action="store", dest="dataset_type", type=dataset_type_arg, nargs="+", choices=self.get_supported_dataset_types(), default=DatasetType.ARG25, required=True, metavar=" ".join([s.name for s in self.get_supported_dataset_types()])) self.parser.add_argument("--output-directory", help="Output directory", action="store", dest="output_directory", type=writeable_dir, required=True) self.parser.add_argument("--overwrite", help="Over write existing output file", action="store_true", dest="overwrite", default=False) self.parser.add_argument("--list-only", help="List the datasets that would be retrieved rather than retrieving them", action="store_true", dest="list_only", default=False) self.parser.add_argument("--output-format", help="The format of the output dataset", action="store", dest="output_format", type=output_format_arg, choices=OutputFormat, default=OutputFormat.GEOTIFF, metavar=" ".join([f.name for f in OutputFormat]))
def setup_arguments(self): # Call method on super class # super(self.__class__, self).setup_arguments() CellTool.setup_arguments(self) self.parser.add_argument("--dataset-type", help="The type(s) of dataset to retrieve", action="store", dest="dataset_type", type=dataset_type_arg, choices=self.get_supported_dataset_types(), default=DatasetType.ARG25, required=True, metavar=" ".join([s.name for s in self.get_supported_dataset_types()])) group = self.parser.add_mutually_exclusive_group() # TODO explicit list of bands # group.add_argument("--bands", help="List of bands to retrieve", action="store") group.add_argument("--bands-all", help="Retrieve all bands with NULL values where the band is N/A", action="store_const", dest="bands", const=BandListType.ALL) group.add_argument("--bands-common", help="Retrieve only bands in common across all satellites", action="store_const", dest="bands", const=BandListType.COMMON) self.parser.set_defaults(bands=BandListType.ALL) self.parser.add_argument("--output-directory", help="Output directory", action="store", dest="output_directory", type=writeable_dir, required=True) self.parser.add_argument("--overwrite", help="Over write existing output file", action="store_true", dest="overwrite", default=False) self.parser.add_argument("--list-only", help="List the datasets that would be retrieved rather than retrieving them", action="store_true", dest="list_only", default=False) self.parser.add_argument("--output-format", help="The format of the output dataset", action="store", dest="output_format", type=output_format_arg, choices=OutputFormat, default=OutputFormat.GEOTIFF, metavar=" ".join([f.name for f in OutputFormat]))