diff --git a/exposureshare/exposureshare.py b/exposureshare/exposureshare.py index 8e912427c913c3721413799bec2e2b40cd611986..5c3dd385c994a3a197e0c4455a0024878fb39157 100644 --- a/exposureshare/exposureshare.py +++ b/exposureshare/exposureshare.py @@ -77,10 +77,12 @@ def command_line_interface(): `-a`: Append to existing database (do not remove all existing data in the output database defined by `-e`. The commands `baseline`, `baseline-as-standard`, `standard`, `both` also offer: - `-C`: Import country assets of the country given in `-i`. - `-B`: Import boundaries of the country given in `-i`. + `-C`: Import country assets of the country or bounding box given in `-i`. + `-B`: Import boundaries of the country or bounding box given in `-i`. + `-T`: Import tiles of the country or bounding box given in `-i`. The commands `standard` and `both` offer additionally: - `-b`: Import buildings from the building database into the `Building` table. + `-b`: Import buildings of the country or bounding box given in `-i` from the building + database into the `Building` table. The commands `aggregated` and `aggregate-only` offer additionally: `-m`: Minimum number of buildings per tile below which the tile will be aggregated with its neighbors into a parent tile (optional, default: 10). @@ -143,31 +145,34 @@ def command_line_interface(): help="Minimum zoom level at which the aggregation stops.", ) - parser_buildings_shared = argparse.ArgumentParser(add_help=False) - parser_buildings_shared.add_argument( + parser_options_shared = argparse.ArgumentParser(add_help=False) + parser_options_shared.add_argument( "-b", "--import-buildings", required=False, action="store_true", help="Import buildings from the buildings database.", ) - - parser_country_assets_shared = argparse.ArgumentParser(add_help=False) - parser_country_assets_shared.add_argument( + parser_options_shared.add_argument( "-C", "--import-country-assets", required=False, action="store_true", help="Import country assets.", ) - - parser_boundaries_shared = argparse.ArgumentParser(add_help=False) - parser_boundaries_shared.add_argument( + parser_options_shared.add_argument( "-B", "--import-boundaries", required=False, action="store_true", - help="Import boundaries for the given country.", + help="Import boundaries.", + ) + parser_options_shared.add_argument( + "-T", + "--import-tiles", + required=False, + action="store_true", + help="Import tiles.", ) # Create the subparsers @@ -180,9 +185,7 @@ def command_line_interface(): parents=[ parser_shared, parser_download_shared, - parser_buildings_shared, - parser_boundaries_shared, - parser_country_assets_shared, + parser_options_shared, ], ) subparsers.add_parser( @@ -192,9 +195,7 @@ def command_line_interface(): parents=[ parser_shared, parser_download_shared, - parser_buildings_shared, - parser_boundaries_shared, - parser_country_assets_shared, + parser_options_shared, ], ) subparsers.add_parser( @@ -205,9 +206,7 @@ def command_line_interface(): parents=[ parser_shared, parser_download_shared, - parser_buildings_shared, - parser_boundaries_shared, - parser_country_assets_shared, + parser_options_shared, ], ) subparsers.add_parser( @@ -217,9 +216,7 @@ def command_line_interface(): parents=[ parser_shared, parser_download_shared, - parser_buildings_shared, - parser_boundaries_shared, - parser_country_assets_shared, + parser_options_shared, ], ) subparsers.add_parser( @@ -289,6 +286,7 @@ def command_line_interface(): import_area, obm_source_db_config=obm_source_db_config, append=args.append, + import_tiles=args.import_tiles, import_buildings=args.import_buildings, import_boundaries=args.import_boundaries, import_country_assets=args.import_country_assets,