geovisio 2.6.0__py3-none-any.whl → 2.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. geovisio/__init__.py +36 -7
  2. geovisio/admin_cli/cleanup.py +2 -2
  3. geovisio/admin_cli/db.py +1 -4
  4. geovisio/config_app.py +40 -1
  5. geovisio/db_migrations.py +24 -3
  6. geovisio/templates/main.html +13 -13
  7. geovisio/templates/viewer.html +3 -3
  8. geovisio/translations/de/LC_MESSAGES/messages.mo +0 -0
  9. geovisio/translations/de/LC_MESSAGES/messages.po +804 -0
  10. geovisio/translations/el/LC_MESSAGES/messages.mo +0 -0
  11. geovisio/translations/el/LC_MESSAGES/messages.po +685 -0
  12. geovisio/translations/en/LC_MESSAGES/messages.mo +0 -0
  13. geovisio/translations/en/LC_MESSAGES/messages.po +738 -0
  14. geovisio/translations/es/LC_MESSAGES/messages.mo +0 -0
  15. geovisio/translations/es/LC_MESSAGES/messages.po +778 -0
  16. geovisio/translations/fi/LC_MESSAGES/messages.mo +0 -0
  17. geovisio/translations/fi/LC_MESSAGES/messages.po +589 -0
  18. geovisio/translations/fr/LC_MESSAGES/messages.mo +0 -0
  19. geovisio/translations/fr/LC_MESSAGES/messages.po +814 -0
  20. geovisio/translations/hu/LC_MESSAGES/messages.mo +0 -0
  21. geovisio/translations/hu/LC_MESSAGES/messages.po +773 -0
  22. geovisio/translations/ko/LC_MESSAGES/messages.mo +0 -0
  23. geovisio/translations/ko/LC_MESSAGES/messages.po +685 -0
  24. geovisio/translations/messages.pot +694 -0
  25. geovisio/translations/nl/LC_MESSAGES/messages.mo +0 -0
  26. geovisio/translations/nl/LC_MESSAGES/messages.po +602 -0
  27. geovisio/utils/__init__.py +1 -1
  28. geovisio/utils/auth.py +50 -11
  29. geovisio/utils/db.py +65 -0
  30. geovisio/utils/excluded_areas.py +83 -0
  31. geovisio/utils/extent.py +30 -0
  32. geovisio/utils/fields.py +1 -1
  33. geovisio/utils/filesystems.py +0 -1
  34. geovisio/utils/link.py +14 -0
  35. geovisio/utils/params.py +20 -0
  36. geovisio/utils/pictures.py +110 -88
  37. geovisio/utils/reports.py +171 -0
  38. geovisio/utils/sequences.py +262 -126
  39. geovisio/utils/tokens.py +37 -42
  40. geovisio/utils/upload_set.py +642 -0
  41. geovisio/web/auth.py +37 -37
  42. geovisio/web/collections.py +304 -304
  43. geovisio/web/configuration.py +14 -0
  44. geovisio/web/docs.py +276 -15
  45. geovisio/web/excluded_areas.py +377 -0
  46. geovisio/web/items.py +169 -112
  47. geovisio/web/map.py +104 -36
  48. geovisio/web/params.py +69 -26
  49. geovisio/web/pictures.py +14 -31
  50. geovisio/web/reports.py +399 -0
  51. geovisio/web/rss.py +13 -7
  52. geovisio/web/stac.py +129 -134
  53. geovisio/web/tokens.py +98 -109
  54. geovisio/web/upload_set.py +771 -0
  55. geovisio/web/users.py +100 -73
  56. geovisio/web/utils.py +28 -9
  57. geovisio/workers/runner_pictures.py +241 -207
  58. {geovisio-2.6.0.dist-info → geovisio-2.7.1.dist-info}/METADATA +17 -14
  59. geovisio-2.7.1.dist-info/RECORD +70 -0
  60. {geovisio-2.6.0.dist-info → geovisio-2.7.1.dist-info}/WHEEL +1 -1
  61. geovisio-2.6.0.dist-info/RECORD +0 -41
  62. {geovisio-2.6.0.dist-info → geovisio-2.7.1.dist-info}/LICENSE +0 -0
@@ -1,5 +1,8 @@
1
1
  import flask
2
+ from typing import Dict, Any
2
3
  from flask import jsonify
4
+ from flask_babel import get_locale
5
+ from geovisio.web.utils import get_api_version
3
6
 
4
7
  bp = flask.Blueprint("configuration", __name__, url_prefix="/api")
5
8
 
@@ -19,14 +22,25 @@ def configuration():
19
22
  $ref: '#/components/schemas/GeoVisioConfiguration'
20
23
  """
21
24
 
25
+ apiSum = flask.current_app.config["API_SUMMARY"]
26
+ userLang = get_locale().language
22
27
  return jsonify(
23
28
  {
29
+ "name": _get_translated(apiSum.name, userLang),
30
+ "description": _get_translated(apiSum.description, userLang),
31
+ "logo": apiSum.logo,
32
+ "color": str(apiSum.color),
24
33
  "auth": _auth_configuration(),
25
34
  "license": _license_configuration(),
35
+ "version": get_api_version(),
26
36
  }
27
37
  )
28
38
 
29
39
 
40
+ def _get_translated(prop: Dict[str, str], userLang) -> Dict[str, Any]:
41
+ return {"label": prop.get(userLang, prop.get("en")), "langs": prop}
42
+
43
+
30
44
  def _auth_configuration():
31
45
  from geovisio.utils import auth
32
46
 
geovisio/web/docs.py CHANGED
@@ -1,7 +1,9 @@
1
- from geovisio.web import utils
1
+ from geovisio.web import utils, upload_set, reports, excluded_areas
2
+ from geovisio.utils import upload_set as upload_set_utils, reports as reports_utils, excluded_areas as excluded_areas_utils
2
3
  from importlib import metadata
3
4
  import re
4
5
 
6
+
5
7
  API_CONFIG = {
6
8
  "openapi": "3.1.0",
7
9
  "paths": {
@@ -40,6 +42,28 @@ API_CONFIG = {
40
42
  "STACCollection": {
41
43
  "$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/collections/openapi.yaml#/components/schemas/collection"
42
44
  },
45
+ "STACProvider": {
46
+ # We cannot reference the STACProvider from the STAC spec because it is defined in an array, so this is a copy of the definition
47
+ "type": "object",
48
+ "required": ["name"],
49
+ "properties": {
50
+ "name": {"description": "The name of the organization or the individual.", "type": "string"},
51
+ "description": {
52
+ "description": "Multi-line description to add further provider information such as processing details for processors and producers, hosting details for hosts or basic contact information.\n\n[CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation.",
53
+ "type": "string",
54
+ },
55
+ "roles": {
56
+ "description": "Roles of the provider.\n\nThe provider's role(s) can be one or more of the following\nelements:\n\n* licensor: The organization that is licensing the dataset under\n the license specified in the collection's license field.\n* producer: The producer of the data is the provider that\n initially captured and processed the source data, e.g. ESA for\n Sentinel-2 data.\n* processor: A processor is any provider who processed data to a\n derived product.\n* host: The host is the actual provider offering the data on their\n storage. There should be no more than one host, specified as last\n element of the list.",
57
+ "type": "array",
58
+ "items": {"type": "string", "enum": ["producer", "licensor", "processor", "host"]},
59
+ },
60
+ "url": {
61
+ "description": "Homepage on which the provider describes the dataset and publishes contact information.",
62
+ "type": "string",
63
+ "format": "url",
64
+ },
65
+ },
66
+ },
43
67
  "STACCollectionItems": {
44
68
  # The following link is the one that should be used, but is broken due to geometryCollectionGeoJSON definition
45
69
  # "$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/ogcapi-features/openapi.yaml#/components/schemas/featureCollectionGeoJSON"
@@ -122,18 +146,26 @@ API_CONFIG = {
122
146
  },
123
147
  "MapLibreStyleJSON": {
124
148
  "type": "object",
125
- "description": """
126
- MapLibre Style JSON, see https://maplibre.org/maplibre-style-spec/ for reference.
149
+ "description": """MapLibre Style JSON, see https://maplibre.org/maplibre-style-spec/ for reference.
127
150
 
128
- Source ID is either \"geovisio\" or \"geovisio_\{userId\}\".
151
+ Source ID is either \"geovisio\" or \"geovisio_{userId}\".
129
152
 
130
- Layers ID are \"geovisio_grid\", \"geovisio_sequences\" and \"geovisio_pictures\", or with user UUID included (\"geovisio_\{userId\}_sequences\" and \"geovisio_\{userId\}_pictures\").
153
+ Layers ID are \"geovisio_grid\", \"geovisio_sequences\" and \"geovisio_pictures\", or with user UUID included (\"geovisio_{userId}_sequences\" and \"geovisio_{userId}_pictures\").
131
154
 
132
155
  Note that you may not rely only on these ID that could change through time.
133
156
  """,
134
157
  "properties": {
135
158
  "version": {"type": "integer", "example": 8},
136
159
  "name": {"type": "string", "example": "GeoVisio Vector Tiles"},
160
+ "metadata": {
161
+ "type": "object",
162
+ "properties": {
163
+ "panoramax:fields": {
164
+ "type": "object",
165
+ "description": "Available properties per layer (layer: [field1, field2...])",
166
+ }
167
+ },
168
+ },
137
169
  "sources": {
138
170
  "type": "object",
139
171
  "properties": {
@@ -167,7 +199,17 @@ Note that you may not rely only on these ID that could change through time.
167
199
  "GeoVisioLanding": {
168
200
  "allOf": [
169
201
  {"$ref": "#/components/schemas/STACLanding"},
170
- {"type": "object", "properties": {"extent": {"$ref": "#/components/schemas/STACExtent"}}},
202
+ {
203
+ "type": "object",
204
+ "properties": {
205
+ "extent": {"$ref": "#/components/schemas/STACExtent"},
206
+ "geovisio_version": {
207
+ "type": "string",
208
+ "description": "The GeoVisio API version number",
209
+ "example": "2.6.0-12-ab12cd34",
210
+ },
211
+ },
212
+ },
171
213
  ]
172
214
  },
173
215
  "GeoVisioCatalog": {
@@ -192,12 +234,31 @@ Note that you may not rely only on these ID that could change through time.
192
234
  },
193
235
  ]
194
236
  },
237
+ "GeoVisioPostUploadSet": upload_set.UploadSetCreationParameter.model_json_schema(
238
+ ref_template="#/components/schemas/GeoVisioPostUploadSet/$defs/{model}", mode="serialization"
239
+ ),
240
+ "GeoVisioUploadSet": upload_set_utils.UploadSet.model_json_schema(
241
+ ref_template="#/components/schemas/GeoVisioUploadSet/$defs/{model}", mode="serialization"
242
+ ),
243
+ "GeoVisioAddToUploadSet": upload_set.AddFileToUploadSetParameter.model_json_schema(
244
+ ref_template="#/components/schemas/GeoVisioAddToUploadSet/$defs/{model}", mode="serialization"
245
+ ),
246
+ "GeoVisioUploadSets": upload_set_utils.UploadSets.model_json_schema(
247
+ ref_template="#/components/schemas/GeoVisioUploadSets/$defs/{model}", mode="serialization"
248
+ ),
249
+ "GeoVisioUploadSetFile": upload_set_utils.UploadSetFile.model_json_schema(
250
+ ref_template="#/components/schemas/GeoVisioUploadSetFile/$defs/{model}", mode="serialization"
251
+ ),
252
+ "GeoVisioUploadSetFiles": upload_set_utils.UploadSetFiles.model_json_schema(
253
+ ref_template="#/components/schemas/GeoVisioUploadSetFiles/$defs/{model}", mode="serialization"
254
+ ),
195
255
  "GeoVisioCollectionOfCollection": {
196
256
  "allOf": [
197
257
  {"$ref": "#/components/schemas/STACCollection"},
198
258
  {
199
259
  "type": "object",
200
260
  "properties": {
261
+ "geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
201
262
  "links": {
202
263
  "type": "array",
203
264
  "items": {
@@ -207,6 +268,7 @@ Note that you may not rely only on these ID that could change through time.
207
268
  "stats:items": {"$ref": "#/components/schemas/STACStatsForItems"},
208
269
  "extent": {"$ref": "#/components/schemas/STACExtentTemporal"},
209
270
  "geovisio:status": {"$ref": "#/components/schemas/GeoVisioCollectionStatus"},
271
+ "geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
210
272
  "created": {
211
273
  "type": "string",
212
274
  "format": "date-time",
@@ -219,7 +281,7 @@ Note that you may not rely only on these ID that could change through time.
219
281
  },
220
282
  },
221
283
  },
222
- }
284
+ },
223
285
  },
224
286
  },
225
287
  ]
@@ -264,6 +326,18 @@ Note that you may not rely only on these ID that could change through time.
264
326
  },
265
327
  },
266
328
  },
329
+ "GeoVisioProvider": {
330
+ # In geovisio, Provider have an additional optional ID
331
+ "allOf": [
332
+ {"$ref": "#/components/schemas/STACProvider"},
333
+ {
334
+ "type": "object",
335
+ "properties": {
336
+ "id": {"type": "string", "format": "uuid"},
337
+ },
338
+ },
339
+ ]
340
+ },
267
341
  "GeoVisioCollection": {
268
342
  "allOf": [
269
343
  {"$ref": "#/components/schemas/STACCollection"},
@@ -273,6 +347,30 @@ Note that you may not rely only on these ID that could change through time.
273
347
  "stats:items": {"$ref": "#/components/schemas/STACStatsForItems"},
274
348
  "geovisio:status": {"$ref": "#/components/schemas/GeoVisioCollectionStatus"},
275
349
  "geovisio:sorted-by": {"$ref": "#/components/schemas/GeoVisioCollectionSortedBy"},
350
+ "geovisio:upload-software": {"$ref": "#/components/schemas/GeoVisioCollectionUploadSoftware"},
351
+ "geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
352
+ "quality:horizontal_accuracy": {"type": "number", "title": "Estimated GPS position precision (in meters)"},
353
+ "quality:horizontal_accuracy_type": {
354
+ "type": "string",
355
+ "title": "Estimation process for GPS precision",
356
+ "example": "95% confidence interval",
357
+ },
358
+ "providers": {
359
+ "type": "array",
360
+ "items": {
361
+ "$ref": "#/components/schemas/GeoVisioProvider",
362
+ },
363
+ },
364
+ "summaries": {
365
+ "type": "object",
366
+ "properties": {
367
+ "panoramax:horizontal_pixel_density": {
368
+ "type": "array",
369
+ "title": "Number of pixels on horizon per field of view degree (as a list with a single value for STAC conformance)",
370
+ "items": {"type": "integer", "minimum": 0},
371
+ },
372
+ },
373
+ },
276
374
  },
277
375
  },
278
376
  ]
@@ -367,6 +465,15 @@ If unset, sort order is unchanged.
367
465
  "geovisio:thumbnail": {"type": "string", "format": "uri"},
368
466
  "original_file:size": {"type": "integer", "minimum": 0, "title": "Size of the original file, in bytes"},
369
467
  "original_file:name": {"type": "string", "title": "Original file name"},
468
+ "panoramax:horizontal_pixel_density": {
469
+ "type": "integer",
470
+ "minimum": 0,
471
+ "title": "Number of pixels on horizon per field of view degree",
472
+ },
473
+ "quality:horizontal_accuracy": {
474
+ "type": "number",
475
+ "title": "Estimated GPS position precision (in meters)",
476
+ },
370
477
  },
371
478
  }
372
479
  },
@@ -398,7 +505,7 @@ If unset, sort order is unchanged.
398
505
  "GeoVisioPostItem": {
399
506
  "type": "object",
400
507
  "patternProperties": {
401
- "override_(Exif|Xmp)\..+": {
508
+ r"override_(Exif|Xmp)\..+": {
402
509
  "type": "string",
403
510
  "description": "An EXIF or XMP tag to use instead of existing one in picture file metadata. The query name can be any valid Exiv2 property name.",
404
511
  }
@@ -412,7 +519,7 @@ If unset, sort order is unchanged.
412
519
  },
413
520
  "isBlurred": {
414
521
  "type": "string",
415
- "description": "Is picture blurred",
522
+ "description": "Is picture blurred. If set to 'true', the server will not apply the face blurring algorithm but will publish the image as it is",
416
523
  "enum": ["true", "false", "null"],
417
524
  "default": "false",
418
525
  },
@@ -444,12 +551,12 @@ If unset, sort order is unchanged.
444
551
  "place_position": {
445
552
  "description": "Geographical coordinates (lon,lat) of a place you'd like to have pictures of. Returned pictures are either 360° or looking in direction of wanted place.",
446
553
  "type": "string",
447
- "pattern": "-?\d+\.\d+,-?\d+\.\d+",
554
+ "pattern": r"-?\d+\.\d+,-?\d+\.\d+",
448
555
  },
449
556
  "place_distance": {
450
557
  "description": "Distance range (in meters) to search pictures for a particular place (place_position). Default range is 3-15. Only used if place_position parameter is defined.",
451
558
  "type": "string",
452
- "pattern": "\d+-\d+",
559
+ "pattern": r"\d+-\d+",
453
560
  },
454
561
  "place_fov_tolerance": {
455
562
  "type": "integer",
@@ -494,6 +601,7 @@ Note that this parameter is not taken in account for 360° pictures, as by defin
494
601
  },
495
602
  },
496
603
  "GeoVisioCollectionStatus": {"type": "string", "enum": ["ready", "broken", "preparing", "waiting-for-process"]},
604
+ "GeoVisioLengthKm": {"type": "number", "description": "Total length of sequence (in kilometers)"},
497
605
  "GeoVisioCollectionSortedBy": {
498
606
  "description": """
499
607
  Define the pictures sort order of the sequence. Null by default, and can be set via the collection PATCH.
@@ -507,10 +615,39 @@ Available properties are:
507
615
  "type": "string",
508
616
  "enum": ["+gpsdate", "-gpsdate", "+filedate", "-filedate", "+filename", "-filename"],
509
617
  },
618
+ "GeoVisioCollectionUploadSoftware": {
619
+ "type": "string",
620
+ "enum": ["unknown", "other", "website", "cli", "mobile_app"],
621
+ "description": "Simplified name of software used to create this collection",
622
+ },
510
623
  "GeoVisioItemStatus": {
511
624
  "type": "string",
512
625
  "enum": ["ready", "broken", "waiting-for-process"],
513
626
  },
627
+ "GeoVisioPostReport": reports.ReportCreationParameter.model_json_schema(
628
+ ref_template="#/components/schemas/GeoVisioPostReport/$defs/{model}", mode="serialization"
629
+ ),
630
+ "GeoVisioPatchReport": reports.EditReportParameter.model_json_schema(
631
+ ref_template="#/components/schemas/GeoVisioPatchReport/$defs/{model}", mode="serialization"
632
+ ),
633
+ "GeoVisioReport": reports_utils.Report.model_json_schema(
634
+ ref_template="#/components/schemas/GeoVisioReport/$defs/{model}", mode="serialization"
635
+ ),
636
+ "GeoVisioReports": reports_utils.Reports.model_json_schema(
637
+ ref_template="#/components/schemas/GeoVisioReports/$defs/{model}", mode="serialization"
638
+ ),
639
+ "GeoVisioExcludedArea": excluded_areas_utils.ExcludedAreaFeature.model_json_schema(
640
+ ref_template="#/components/schemas/GeoVisioExcludedArea/$defs/{model}", mode="serialization"
641
+ ),
642
+ "GeoVisioExcludedAreas": excluded_areas_utils.ExcludedAreaFeatureCollection.model_json_schema(
643
+ ref_template="#/components/schemas/GeoVisioExcludedAreas/$defs/{model}", mode="serialization"
644
+ ),
645
+ "GeoVisioExcludedAreaCreateFeature": excluded_areas.ExcludedAreaCreateFeature.model_json_schema(
646
+ ref_template="#/components/schemas/GeoVisioExcludedAreaCreateFeature/$defs/{model}", mode="serialization"
647
+ ),
648
+ "GeoVisioExcludedAreaCreateCollection": excluded_areas.ExcludedAreaCreateCollection.model_json_schema(
649
+ ref_template="#/components/schemas/GeoVisioExcludedAreaCreateCollection/$defs/{model}", mode="serialization"
650
+ ),
514
651
  "GeoVisioUserList": {
515
652
  "type": "object",
516
653
  "properties": {
@@ -570,6 +707,39 @@ Available properties are:
570
707
  "GeoVisioConfiguration": {
571
708
  "type": "object",
572
709
  "properties": {
710
+ "name": {
711
+ "type": "object",
712
+ "properties": {
713
+ "label": {"type": "string", "description": "User-readable server name, in user language"},
714
+ "langs": {
715
+ "type": "object",
716
+ "additionalProperties": "string",
717
+ "description": "Translated names as lang -> value object",
718
+ "default": {"en": "GeoVisio"},
719
+ },
720
+ },
721
+ },
722
+ "description": {
723
+ "type": "object",
724
+ "properties": {
725
+ "label": {"type": "string", "description": "User-readable server description, in user language"},
726
+ "langs": {
727
+ "type": "object",
728
+ "additionalProperties": "string",
729
+ "description": "Translated descriptions as lang -> value object",
730
+ "default": {"en": "The open source photo mapping solution"},
731
+ },
732
+ },
733
+ },
734
+ "logo": {
735
+ "default": "https://gitlab.com/panoramax/gitlab-profile/-/raw/main/images/logo.svg",
736
+ "format": "uri",
737
+ "maxLength": 2083,
738
+ "minLength": 1,
739
+ "title": "Logo",
740
+ "type": "string",
741
+ },
742
+ "color": {"default": "#bf360c", "format": "color", "title": "Color", "type": "string"},
573
743
  "auth": {
574
744
  "type": "object",
575
745
  "properties": {
@@ -586,6 +756,11 @@ Available properties are:
586
756
  },
587
757
  "required": ["id"],
588
758
  },
759
+ "geovisio_version": {
760
+ "type": "string",
761
+ "description": "The GeoVisio API version number",
762
+ "example": "2.6.0-12-ab12cd34",
763
+ },
589
764
  },
590
765
  "required": ["auth"],
591
766
  },
@@ -640,6 +815,14 @@ Available properties are:
640
815
  },
641
816
  ]
642
817
  },
818
+ "GeoVisioError": {
819
+ "type": "object",
820
+ "properties": {
821
+ "message": {"type": "string", "description": "The error message"},
822
+ "status_code": {"type": "integer", "description": "The HTTP status code"},
823
+ "payload": {"type": "object", "description": "The error payload"},
824
+ },
825
+ },
643
826
  },
644
827
  "parameters": {
645
828
  "STAC_bbox": {"$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/item-search/openapi.yaml#/components/parameters/bbox"},
@@ -704,14 +887,14 @@ Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials
704
887
  "in": "query",
705
888
  "required": False,
706
889
  "description": "Geographical coordinates (lon,lat) of a place you'd like to have pictures of. Returned pictures are either 360° or looking in direction of wanted place.",
707
- "schema": {"type": "string", "pattern": "-?\d+\.\d+,-?\d+\.\d+"},
890
+ "schema": {"type": "string", "pattern": r"-?\d+\.\d+,-?\d+\.\d+"},
708
891
  },
709
892
  "GeoVisio_place_distance": {
710
893
  "name": "place_distance",
711
894
  "in": "query",
712
895
  "required": False,
713
896
  "description": "Distance range (in meters) to search pictures for a particular place (place_position). Default range is 3-15. Only used if place_position parameter is defined.",
714
- "schema": {"type": "string", "pattern": "\d+-\d+", "default": "3-15"},
897
+ "schema": {"type": "string", "pattern": r"\d+-\d+", "default": "3-15"},
715
898
  },
716
899
  "GeoVisio_place_fov_tolerance": {
717
900
  "name": "place_fov_tolerance",
@@ -735,6 +918,78 @@ Note that this parameter is not taken in account for 360° pictures, as by defin
735
918
  "required": False,
736
919
  "schema": {"type": "integer", "minimum": 2, "maximum": 180, "default": 30},
737
920
  },
921
+ "GeoVisioReports_filter": {
922
+ "name": "filter",
923
+ "in": "query",
924
+ "description": """
925
+ A CQL2 filter expression for filtering reports.
926
+
927
+ Allowed properties are:
928
+ * status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
929
+ * reporter: 'me', user account ID or unset
930
+ * owner: 'me', user account ID or unset
931
+
932
+ Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
933
+
934
+ Examples:
935
+
936
+ * status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')
937
+
938
+ By default, we only show open or waiting reports, sorted by descending creation date.
939
+ """,
940
+ "required": False,
941
+ "schema": {
942
+ "type": "string",
943
+ "default": "status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')",
944
+ },
945
+ },
946
+ "GeoVisioUserReports_filter": {
947
+ "name": "filter",
948
+ "in": "query",
949
+ "description": """
950
+ A CQL2 filter expression for filtering reports.
951
+
952
+ Allowed properties are:
953
+ * status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
954
+ * reporter: 'me' or unset
955
+ * owner: 'me' or unset
956
+
957
+ Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
958
+
959
+ Examples:
960
+
961
+ * status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')
962
+
963
+ By default, we only show open or waiting reports concerning you, sorted by descending creation date.
964
+ """,
965
+ "required": False,
966
+ "schema": {
967
+ "type": "string",
968
+ "default": "status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')",
969
+ },
970
+ },
971
+ "UploadSetFilter": {
972
+ "name": "filter",
973
+ "in": "query",
974
+ "description": """
975
+ A CQL2 filter expression for filtering upload sets.
976
+
977
+ Allowed properties are:
978
+ * completed: TRUE or FALSE
979
+ * dispatched: TRUE or FALSE
980
+
981
+ Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
982
+
983
+ Examples:
984
+
985
+ * 'completed = TRUE AND dispatched = FALSE'
986
+
987
+ By default, we only show non dispatched upload sets.
988
+ If you want all the upload sets, you need to set an empty filter or a filter that matches everything.
989
+ """,
990
+ "required": False,
991
+ "schema": {"type": "string", "default": "completed=FALSE AND dispatched = FALSE"},
992
+ },
738
993
  "OGC_sortby": {
739
994
  "name": "sortby",
740
995
  "in": "query",
@@ -795,7 +1050,7 @@ def getApiInfo():
795
1050
  author = apiMeta["Author-email"].split(",")[0]
796
1051
  m = AUTHOR_RGX.match(author)
797
1052
  if not m:
798
- raise Exception("impossible to find email in pyproject")
1053
+ raise Exception("Impossible to find email in pyproject")
799
1054
  name = m.group("Name")
800
1055
  email = m.group("Email")
801
1056
 
@@ -817,8 +1072,14 @@ def getApiDocs():
817
1072
  {"name": "Sequences", "description": "Collections of pictures"},
818
1073
  {"name": "Pictures", "description": "Geolocated images"},
819
1074
  {"name": "Map", "description": "Tiles for web map display"},
820
- {"name": "Upload", "description": "Sending pictures & sequences"},
1075
+ {
1076
+ "name": "Upload",
1077
+ "description": "Sending pictures & sequences",
1078
+ "externalDocs": {"url": "https://docs.panoramax.fr/api/api/api/#upload"},
1079
+ },
821
1080
  {"name": "Editing", "description": "Modifying pictures & sequences"},
1081
+ {"name": "Reports", "description": "Report issues with pictures & sequences"},
1082
+ {"name": "Excluded Areas", "description": "Areas where pictures cannot be uploaded"},
822
1083
  {"name": "Users", "description": "Account management"},
823
1084
  {"name": "Auth", "description": "User authentication"},
824
1085
  ],