aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-09-28 12:30:15 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-09-28 12:45:45 +0200
commitee40efccfc1a4ab2d447c3c6e9611a218fa93d09 (patch)
tree523a88ca11c9fad65195cb5d3f5a88fa2575ee5e
parentf5fd16dff41a71a78ee5ee8ba49ba73c11c37896 (diff)
Improve --help description.
-rwxr-xr-xgis-observation-map41
1 files changed, 21 insertions, 20 deletions
diff --git a/gis-observation-map b/gis-observation-map
index 5b75b89..9baa12f 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -78,33 +78,34 @@ class geometryAction(argparse.Action):
parser = argparse.ArgumentParser(
description='Create a QGIS project with observations from Artdatabanken.',
prog = programName,
- usage='''%(prog)s --project-home=DIR --project-name=NAME {--geometry=FILE|--point=X,Y} ...
- %(prog)s {--geometry=FILE|--point=X,Y} ...'''
+ usage='''%(prog)s --project-home=DIR --project-name=NAME {--geometry=FILE|--point=X,Y} ...'''
)
-parser.add_argument('--margin', type=int,
- help='Margin (in meters) around geometry envelopes')
-parser.add_argument('--topo-basedir', default=config['QGIS']['topo-basedir'], type=ePath,
- help='Base directory for "Topografi 10", "Topografi 50", etc.')
-parser.add_argument('--project-name',
+parser.add_argument('--project-name', metavar='NAME',
help='Project filename (and title)')
-parser.add_argument('--project-home', type=ePath,
+parser.add_argument('--project-home', type=ePath, metavar='DIRECTORY',
help='Project home directory')
-parser.add_argument('--geometry-style', type=ePath, dest='geometry_style',
+parser.add_argument('--topo-basedir', default=config['QGIS']['topo-basedir'], type=ePath, metavar='DIRECTORY',
+ help='Base directory for "Topografi 10", "Topografi 50", etc.')
+parser_geom = parser.add_argument_group('Geographic area of interest')
+parser_geom.add_argument('--geometry-style', type=ePath, dest='geometry_style', metavar='STYLE_FILE',
help='QGIS Layer Style File (*.qml) to apply to subsequent geometry files')
-parser.add_argument('--geometry', nargs='*', default=[], type=ePath, action=geometryAction,
- help='Geometry file')
-parser.add_argument('--point', nargs='*', metavar='X,Y', default=[],
+parser_geom.add_argument('--geometry', nargs='*', default=[], type=ePath, metavar='GEOMETRY_FILE', action=geometryAction,
+ help='Geometry file of interest')
+parser_geom.add_argument('--point', nargs='*', metavar='X,Y', default=[],
help=f'Coordinates of interest (in {target_srs.GetName()})')
-parser.add_argument('--observation-format', default='GPKG',
+parser_geom.add_argument('--margin', metavar='N', type=int,
+ help='Margin (in meters) around geometry envelopes')
+parser.add_argument('--observation-format', metavar='FORMAT', default='GPKG',
help='Format for the observation file (default: %(default)s)')
-parser.add_argument('--style', default=config['QGIS']['style'], type=ePath,
+parser.add_argument('--style', default=config['QGIS']['style'], metavar='STYLE_FILE', type=ePath,
help='QGIS Layer Style File (*.qml) to apply to the observation layer (default: %(default)s)')
-parser.add_argument('--data-provider', nargs='*', default=[],
- help='Data provider identifier (for instance "Artportalen,MVM")')
-parser.add_argument('--since',
- help='Start date for observations, in ISO 8601 format')
-parser.add_argument('--until',
- help='End date for observations, in ISO 8601 format')
+parser_filter = parser.add_argument_group('Search filter')
+parser_filter.add_argument('--data-provider', nargs='*', metavar='IDENTIFIER', default=[],
+ help='Data provider identifier(s), for instance "Artportalen,MVM"')
+parser_filter.add_argument('--since', metavar='YYYY-MM-DD',
+ help='Start date for observations in ISO 8601 format')
+parser_filter.add_argument('--until', metavar='YYYY-MM-DD',
+ help='End date for observations in ISO 8601 format')
args = parser.parse_args()