aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-09-27 18:34:45 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-09-27 18:38:54 +0200
commit991f99e6c7f98d7febc94f3a9d38065cfb146d17 (patch)
treeba876dd4d6983a3e06f11d1907e87f2b3ba7b67b
parent045211aa06bfde31960af8639c721fabd2e312f2 (diff)
Search filter: skip ‘not rediscovered observations’.
“Indicates if this observation is a not rediscovered observation. "Not rediscovered observation" is an observation that says that the specified species was not found in a location where it has previously been observed.” — https://github.com/biodiversitydata-se/SOS/blob/master/Docs/SearchFilter.md#notrecovered-filter
-rwxr-xr-xgis-observation-map4
1 files changed, 2 insertions, 2 deletions
diff --git a/gis-observation-map b/gis-observation-map
index 1693ed4..19dabd3 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -386,7 +386,7 @@ def getObservations(taxonLists, taxonRedlistCategories, data):
json.dump(obs, fp, indent=2, ensure_ascii=False)
if projectInstance is not None:
- layer = QgsVectorLayer(path.as_posix() + '''|subset="Kingdom" IN ('Fungi', 'Plantae') AND "IsPositiveObservation" AND "IsNaturalOccurrence" AND "CoordinateUncertaintyInMeters" <= 250''', path.stem, 'ogr')
+ layer = QgsVectorLayer(path.as_posix() + '''|subset="Kingdom" IN ('Fungi', 'Plantae') AND "IsPositiveObservation" AND "IsNaturalOccurrence" AND NOT "IsNotRediscoveredObservation" AND "CoordinateUncertaintyInMeters" <= 250''', path.stem, 'ogr')
if not layer.isValid():
raise Exception(f'ERROR: {path}: failed to load in QGIS')
if 'QGIS' in config.keys() and 'style' in config['QGIS']:
@@ -522,7 +522,7 @@ taxonLists, taxonRedlistCategories = getTaxonLists()
searchFilter = {
'geographics': geograficsFilter,
'determinationFilter': 'NoFilter',
- 'notRecoveredFilter': 'NoFilter',
+ 'notRecoveredFilter': 'DontIncludeNotRecovered',
'occurrenceStatus': 'Present',
'verificationStatus': 'BothVerifiedAndNotVerified',
'output': {