aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgis-observation-map14
1 files changed, 7 insertions, 7 deletions
diff --git a/gis-observation-map b/gis-observation-map
index b04d0cd..effc4b2 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -81,7 +81,7 @@ parser = argparse.ArgumentParser(
%(prog)s {--geometry=FILE|--point=X,Y} ...'''
)
parser.add_argument('--margin', type=int,
- help='Margin (in meters) from geometry envelopes')
+ 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',
@@ -91,7 +91,7 @@ parser.add_argument('--project-home', type=ePath,
parser.add_argument('--geometry-style', type=ePath, dest='geometry_style',
help='QGIS Layer Style File (*.qml) to apply to subsequent geometry files')
parser.add_argument('--geometry', nargs='*', default=[], type=ePath, action=geometryAction,
- help='Geometry filename(s)')
+ help='Geometry file')
parser.add_argument('--point', nargs='*', metavar='X,Y', default=[],
help=f'Coordinates of interest (in {target_srs.GetName()})')
parser.add_argument('--observation-format', default='GPKG',
@@ -435,7 +435,7 @@ def getObservations(taxonLists, taxonRedlistCategories, searchFilter):
suffix = drv.GetMetadataItem(gdal.DMD_EXTENSIONS).split(' ')[0]
path = args.project_home.joinpath(layername.lower()).with_suffix('.' + suffix)
- gdal.VectorTranslate(path.as_posix(), fp.name, reproject=True, dstSRS=target_srs, format=drv.name)
+ gdal.VectorTranslate(path.as_posix(), fp.name, format=drv.name, reproject=True, dstSRS=target_srs)
obs = None
if projectInstance is not None:
@@ -457,7 +457,7 @@ def getTaxonLists():
)
resp.raise_for_status()
taxonLists = resp.json()
- #print(json.dumps(taxonLists, indent=2))
+ #print(json.dumps(taxonLists, indent=2, ensure_ascii=False))
taxonLists2 = {}
# https://github.com/biodiversitydata-se/SOS/blob/master/Src/SOS.lib/Resources/TaxonLists.json
@@ -522,7 +522,7 @@ def getTaxonList(taxonLists, taxonLists2, key, name):
raise Exception(f'multiple results found for taxon list "{name}"')
i = t['id']
if i is None:
- raise Exception(f'no found for taxon list "{name}"')
+ raise Exception(f'no result found for taxon list "{name}"')
resp = requests.get(
artDataBankenURL + f'/species-observation-system/v1/TaxonLists/{i}/Taxa',
@@ -563,7 +563,7 @@ def getTaxonRedlistCategories(taxonLists, i):
taxonRedlistCategories[j] = c
return taxonRedlistCategories
-geograficsFilter = {
+geographicsFilter = {
'geometries': geometricFilter(geometries),
'maxAccuracy': 2500,
'considerObservationAccuracy': True,
@@ -573,7 +573,7 @@ taxonLists, taxonRedlistCategories = getTaxonLists()
# https://github.com/biodiversitydata-se/SOS/blob/master/Docs/SearchFilter.md
searchFilter = {
- 'geographics': geograficsFilter,
+ 'geographics': geographicsFilter,
'determinationFilter': 'NoFilter',
'notRecoveredFilter': 'DontIncludeNotRecovered',
'occurrenceStatus': 'Present',