aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-09-28 13:07:36 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-09-28 13:15:30 +0200
commit8c43e67bf62d3e9b70129a1ae09f2b49e5d83fd8 (patch)
tree14f92c79cb7a8d2492bbb50d8bb4173a21fd9bca
parentee40efccfc1a4ab2d447c3c6e9611a218fa93d09 (diff)
Rename --style option to --observation-style.
-rwxr-xr-xgis-observation-map6
1 files 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)