def cmdLineParse():
parser = argparse.ArgumentParser(description='Transforming GPS coordinates into radar coordinates.',\
formatter_class=argparse.RawTextHelpFormatter,\
epilog=INTRODUCTION+'\n'+EXAMPLE)
parser.add_argument('gps_txt',help='Available GPS station information.')
parser.add_argument('-l', dest='lt', help='lookup table of coordinates transfomration.')
parser.add_argument('-p', dest='dem_par', help='Parameter file of lookup table.')
parser.add_argument('-o', dest='out', help='Output file name of the generated GPS coordinates text.')
inps = parser.parse_args()
if not inps.lt:
parser.print_usage()
sys.exit(os.path.basename(sys.argv[0])+': error: lookup table should be provided.')
if not inps.dem_par:
parser.print_usage()
sys.exit(os.path.basename(sys.argv[0])+': error: dem_par file should be provided.')
return inps
################################################################################################
评论列表
文章目录