25 lines
899 B
Python
25 lines
899 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import sys
|
||
|
import qsomap
|
||
|
import argparse
|
||
|
|
||
|
parser = argparse.ArgumentParser(
|
||
|
description="Render an azimuthal equidistant map of the world " +
|
||
|
"centered on the given point")
|
||
|
|
||
|
parser.add_argument(metavar='ref-lat', type=float, dest='ref_lat',
|
||
|
help='Reference Latitude')
|
||
|
parser.add_argument(metavar='ref-lon', type=float, dest='ref_lon',
|
||
|
help='Reference Longitude')
|
||
|
parser.add_argument('-o', '--output-file', type=argparse.FileType('w'),
|
||
|
help='The output SVG file (default: print to stdout)',
|
||
|
default=sys.stdout)
|
||
|
parser.add_argument('-a', '--adif', type=argparse.FileType('r'),
|
||
|
required=False,
|
||
|
help='ADIF log to load and display on the map')
|
||
|
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
qsomap.render(args.ref_lat, args.ref_lon, args.output_file, args.adif)
|