You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that @vschaffn is making good progress this month, we will set up a simple CLI that allows for the coregistration of two DEMs with Nuth and Kaab.
Context
The purpose of this ticket is to set up the initial file that will allow xDEM to be executed via a CLI command: xdem path_ref path_sec -v. Initially, the command will not execute any functionality but will simply display output.
Add the file xdem_cli.py
Add the function get_parser
defget_parser():
""" ArgumentParser for xdem :return: parser """parser=argparse.ArgumentParser(
description=("Compare Digital Elevation Models"),
fromfile_prefix_chars="@",
)
parser.add_argument(
"reference_dem",
help=(
"path to a reference dem"
),
)
parser.add_argument(
"dem_to_be_aligned",
help=(
"path to a second dem"
),
)
parser.add_argument(
"--loglevel",
default="INFO",
choices=("DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"),
help="Logger level (default: INFO. Should be one of ""(DEBUG, INFO, WARNING, ERROR, CRITICAL)",
)
parser.add_argument(
"--version",
"-v",
action="version",
version=f"%(prog)s {xdem.__version__}",
)
returnparser
add main function
defmain():
""" Call demcompare's main """parser=get_parser()
argcomplete.autocomplete(parser)
args=parser.parse_args()
# use a global try/except to cathxdem.run(args.reference_dem, args.dem_to_be_aligned, args.verbose)
if__name__=="__main__":
main()
Given that @vschaffn is making good progress this month, we will set up a simple CLI that allows for the coregistration of two DEMs with Nuth and Kaab.
Context
The purpose of this ticket is to set up the initial file that will allow xDEM to be executed via a CLI command:
xdem path_ref path_sec -v
. Initially, the command will not execute any functionality but will simply display output.xdem_cli.py
get_parser
run(configfile)
Tests
Documentation
In folder doc/source/quickstart.md :
The text was updated successfully, but these errors were encountered: