From 8c43e67bf62d3e9b70129a1ae09f2b49e5d83fd8 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 28 Sep 2023 13:07:36 +0200 Subject: Rename --style option to --observation-style. --- gis-observation-map | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gis-observation-map b/gis-observation-map index 9baa12f..6a5ead9 100755 --- a/gis-observation-map +++ b/gis-observation-map @@ -97,7 +97,7 @@ 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'], metavar='STYLE_FILE', type=ePath, +parser.add_argument('--observation-style', default=config['QGIS']['observation-style'], metavar='STYLE_FILE', type=ePath, help='QGIS Layer Style File (*.qml) to apply to the observation layer (default: %(default)s)') parser_filter = parser.add_argument_group('Search filter') parser_filter.add_argument('--data-provider', nargs='*', metavar='IDENTIFIER', default=[], @@ -469,8 +469,8 @@ def getObservations(taxonLists, taxonRedlistCategories, searchFilter): layer = QgsVectorLayer(path.as_posix() + f'|subset={query}', 'Fynd', 'ogr') if not layer.isValid(): raise Exception(f'ERROR: {path}: failed to load in QGIS') - if args.style is not None: - layer.loadNamedStyle(args.style.as_posix()) + if args.observation_style is not None: + layer.loadNamedStyle(args.observation_style.as_posix()) layer.setReadOnly(True) layer.setFlags(QgsMapLayer.Identifiable | QgsMapLayer.Searchable) projectInstance.addMapLayer(layer) -- cgit v1.2.3