geovisio 2.9.0__py3-none-any.whl → 2.11.0__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 (82) hide show
  1. geovisio/__init__.py +8 -1
  2. geovisio/admin_cli/user.py +7 -2
  3. geovisio/config_app.py +26 -12
  4. geovisio/translations/ar/LC_MESSAGES/messages.mo +0 -0
  5. geovisio/translations/ar/LC_MESSAGES/messages.po +818 -0
  6. geovisio/translations/be/LC_MESSAGES/messages.mo +0 -0
  7. geovisio/translations/be/LC_MESSAGES/messages.po +886 -0
  8. geovisio/translations/br/LC_MESSAGES/messages.po +1 -1
  9. geovisio/translations/da/LC_MESSAGES/messages.mo +0 -0
  10. geovisio/translations/da/LC_MESSAGES/messages.po +96 -4
  11. geovisio/translations/de/LC_MESSAGES/messages.mo +0 -0
  12. geovisio/translations/de/LC_MESSAGES/messages.po +214 -122
  13. geovisio/translations/el/LC_MESSAGES/messages.po +1 -1
  14. geovisio/translations/en/LC_MESSAGES/messages.mo +0 -0
  15. geovisio/translations/en/LC_MESSAGES/messages.po +234 -157
  16. geovisio/translations/eo/LC_MESSAGES/messages.mo +0 -0
  17. geovisio/translations/eo/LC_MESSAGES/messages.po +55 -5
  18. geovisio/translations/es/LC_MESSAGES/messages.po +1 -1
  19. geovisio/translations/fi/LC_MESSAGES/messages.po +1 -1
  20. geovisio/translations/fr/LC_MESSAGES/messages.mo +0 -0
  21. geovisio/translations/fr/LC_MESSAGES/messages.po +92 -3
  22. geovisio/translations/hu/LC_MESSAGES/messages.po +1 -1
  23. geovisio/translations/it/LC_MESSAGES/messages.mo +0 -0
  24. geovisio/translations/it/LC_MESSAGES/messages.po +63 -3
  25. geovisio/translations/ja/LC_MESSAGES/messages.po +1 -1
  26. geovisio/translations/ko/LC_MESSAGES/messages.po +1 -1
  27. geovisio/translations/messages.pot +216 -139
  28. geovisio/translations/nl/LC_MESSAGES/messages.mo +0 -0
  29. geovisio/translations/nl/LC_MESSAGES/messages.po +333 -62
  30. geovisio/translations/oc/LC_MESSAGES/messages.mo +0 -0
  31. geovisio/translations/oc/LC_MESSAGES/messages.po +821 -0
  32. geovisio/translations/pl/LC_MESSAGES/messages.po +1 -1
  33. geovisio/translations/pt/LC_MESSAGES/messages.mo +0 -0
  34. geovisio/translations/pt/LC_MESSAGES/messages.po +944 -0
  35. geovisio/translations/pt_BR/LC_MESSAGES/messages.mo +0 -0
  36. geovisio/translations/pt_BR/LC_MESSAGES/messages.po +942 -0
  37. geovisio/translations/sv/LC_MESSAGES/messages.mo +0 -0
  38. geovisio/translations/sv/LC_MESSAGES/messages.po +4 -3
  39. geovisio/translations/ti/LC_MESSAGES/messages.mo +0 -0
  40. geovisio/translations/ti/LC_MESSAGES/messages.po +762 -0
  41. geovisio/translations/tr/LC_MESSAGES/messages.mo +0 -0
  42. geovisio/translations/tr/LC_MESSAGES/messages.po +927 -0
  43. geovisio/translations/uk/LC_MESSAGES/messages.mo +0 -0
  44. geovisio/translations/uk/LC_MESSAGES/messages.po +920 -0
  45. geovisio/translations/zh_Hant/LC_MESSAGES/messages.po +1 -1
  46. geovisio/utils/annotations.py +21 -21
  47. geovisio/utils/auth.py +47 -13
  48. geovisio/utils/cql2.py +22 -5
  49. geovisio/utils/fields.py +14 -2
  50. geovisio/utils/items.py +44 -0
  51. geovisio/utils/model_query.py +2 -2
  52. geovisio/utils/pic_shape.py +1 -1
  53. geovisio/utils/pictures.py +127 -36
  54. geovisio/utils/semantics.py +32 -3
  55. geovisio/utils/sentry.py +1 -1
  56. geovisio/utils/sequences.py +155 -109
  57. geovisio/utils/upload_set.py +303 -206
  58. geovisio/utils/users.py +18 -0
  59. geovisio/utils/website.py +1 -1
  60. geovisio/web/annotations.py +303 -69
  61. geovisio/web/auth.py +1 -1
  62. geovisio/web/collections.py +194 -97
  63. geovisio/web/configuration.py +36 -4
  64. geovisio/web/docs.py +109 -13
  65. geovisio/web/items.py +319 -186
  66. geovisio/web/map.py +92 -54
  67. geovisio/web/pages.py +48 -4
  68. geovisio/web/params.py +100 -42
  69. geovisio/web/pictures.py +37 -3
  70. geovisio/web/prepare.py +4 -2
  71. geovisio/web/queryables.py +57 -0
  72. geovisio/web/stac.py +8 -2
  73. geovisio/web/tokens.py +49 -1
  74. geovisio/web/upload_set.py +226 -51
  75. geovisio/web/users.py +89 -8
  76. geovisio/web/utils.py +26 -8
  77. geovisio/workers/runner_pictures.py +128 -23
  78. {geovisio-2.9.0.dist-info → geovisio-2.11.0.dist-info}/METADATA +15 -14
  79. geovisio-2.11.0.dist-info/RECORD +117 -0
  80. geovisio-2.9.0.dist-info/RECORD +0 -98
  81. {geovisio-2.9.0.dist-info → geovisio-2.11.0.dist-info}/WHEEL +0 -0
  82. {geovisio-2.9.0.dist-info → geovisio-2.11.0.dist-info}/licenses/LICENSE +0 -0
geovisio/web/docs.py CHANGED
@@ -1,4 +1,4 @@
1
- from geovisio.web import collections, items, prepare, users, utils, upload_set, reports, excluded_areas, pages
1
+ from geovisio.web import collections, items, prepare, users, utils, upload_set, reports, excluded_areas, pages, annotations
2
2
  from geovisio.utils import (
3
3
  upload_set as upload_set_utils,
4
4
  reports as reports_utils,
@@ -245,6 +245,12 @@ Note that you may not rely only on these ID that could change through time.
245
245
  "PreparationParameter": prepare.PreparationParameter.model_json_schema(
246
246
  ref_template="#/components/schemas/PreparationParameter/$defs/{model}", mode="serialization"
247
247
  ),
248
+ "GeovisioPostToken": {
249
+ "type": "object",
250
+ "properties": {
251
+ "description": {"type": "string", "description": "optional description of the token"},
252
+ },
253
+ },
248
254
  "GeoVisioPostUploadSet": upload_set.UploadSetCreationParameter.model_json_schema(
249
255
  ref_template="#/components/schemas/GeoVisioPostUploadSet/$defs/{model}", mode="serialization"
250
256
  ),
@@ -303,7 +309,7 @@ Note that you may not rely only on these ID that could change through time.
303
309
  },
304
310
  "GeoVisioCSVCollections": {
305
311
  "type": "string",
306
- "descrition": f"""CSV file containing the collections.
312
+ "description": f"""CSV file containing the collections.
307
313
 
308
314
  The CSV headers will be:
309
315
  * id: ID of the collection
@@ -388,6 +394,7 @@ The CSV headers will be:
388
394
  "geovisio:sorted-by": {"$ref": "#/components/schemas/GeoVisioCollectionSortedBy"},
389
395
  "geovisio:upload-software": {"$ref": "#/components/schemas/GeoVisioCollectionUploadSoftware"},
390
396
  "geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
397
+ "geovisio:visibility": {"$ref": "#/components/schemas/GeoVisioVisibility"},
391
398
  "quality:horizontal_accuracy": {"type": "number", "title": "Estimated GPS position precision (in meters)"},
392
399
  "quality:horizontal_accuracy_type": {
393
400
  "type": "string",
@@ -464,7 +471,22 @@ The CSV headers will be:
464
471
  "datetimetz": {
465
472
  "type": "string",
466
473
  "format": "date-time",
467
- "title": "Date & time with original timezone information",
474
+ "title": "Date & time of the picture (when it was captured).",
475
+ },
476
+ "datetimetz": {
477
+ "type": "string",
478
+ "format": "date-time",
479
+ "title": "Date & time of the picture (when it was captured) with original timezone information",
480
+ },
481
+ "created": {
482
+ "type": "string",
483
+ "format": "date-time",
484
+ "title": "Date & time of picture upload",
485
+ },
486
+ "updated": {
487
+ "type": "string",
488
+ "format": "date-time",
489
+ "title": "Date & time of picture's metadata update",
468
490
  },
469
491
  "geovisio:status": {"$ref": "#/components/schemas/GeoVisioItemStatus"},
470
492
  "geovisio:producer": {"type": "string"},
@@ -475,6 +497,7 @@ The CSV headers will be:
475
497
  "minimum": 1,
476
498
  "title": "Rank of the picture in its collection.",
477
499
  },
500
+ "geovisio:visibility": {"$ref": "#/components/schemas/GeoVisioVisibility"},
478
501
  "original_file:size": {"type": "integer", "minimum": 0, "title": "Size of the original file, in bytes"},
479
502
  "original_file:name": {"type": "string", "title": "Original file name"},
480
503
  "panoramax:horizontal_pixel_density": {
@@ -538,7 +561,7 @@ The CSV headers will be:
538
561
  "override_capture_time": {
539
562
  "type": "string",
540
563
  "format": "date-time",
541
- "description": "datetime when the picture was taken. It will change the picture's metadata with this datetime. It should be an iso 3339 formated datetime (like '2017-07-21T17:32:28Z')",
564
+ "description": "datetime when the picture was taken. It will change the picture's metadata with this datetime. It should be an iso 3339 formatted datetime (like '2017-07-21T17:32:28Z')",
542
565
  },
543
566
  "override_latitude": {
544
567
  "type": "number",
@@ -591,6 +614,20 @@ Example values are:
591
614
  Note that this parameter is not taken in account for 360° pictures, as by definition a nearby place would be theorically always visible in it.
592
615
  """,
593
616
  },
617
+ "sortby": {
618
+ "description": """Define the sort order of the results of a search.
619
+ Sort order is defined based on preceding '+' (asc) or '-' (desc).
620
+
621
+ By default we sort to get the last updated pictures first.
622
+
623
+ Available properties are:
624
+ * `ts`: capture datetime of the picture
625
+ * `updated`: sort by updated datetime of the picture
626
+ * `id`: us the picture ID for sort
627
+ """,
628
+ "default": "-updated",
629
+ "type": "string",
630
+ },
594
631
  },
595
632
  },
596
633
  ],
@@ -620,7 +657,15 @@ Available properties are:
620
657
  },
621
658
  "GeoVisioItemStatus": {
622
659
  "type": "string",
623
- "enum": ["ready", "broken", "waiting-for-process"],
660
+ "enum": ["ready", "broken", "waiting-for-process", "pouet"],
661
+ },
662
+ "GeoVisioVisibility": {
663
+ "type": "string",
664
+ "description": """Visibility of the object. Can be set to:
665
+ * `anyone`: visible to anyone
666
+ * `owner-only`: visible to the owner and administrator only
667
+ * `logged-only`: visible to logged users only. Note that this is not available on all Panoramax instances, only those with restricted account creation. See the possible visibility values for a given instance on /api/configuration (field `visibility`).""",
668
+ "enum": ["anyone", "owner-only", "logged-only"],
624
669
  },
625
670
  "GeoVisioPostReport": reports.ReportCreationParameter.model_json_schema(
626
671
  ref_template="#/components/schemas/GeoVisioPostReport/$defs/{model}", mode="serialization"
@@ -776,6 +821,32 @@ Available properties are:
776
821
  "description": "The GeoVisio API version number",
777
822
  "example": "2.6.0-12-ab12cd34",
778
823
  },
824
+ "defaults": {
825
+ "type": "object",
826
+ "properties": {
827
+ "collaborative_metadata": {
828
+ "type": "integer",
829
+ "description": "If `true`, the pictures's metadata will be, by default, editable by all users.",
830
+ },
831
+ "split_distance": {
832
+ "type": "integer",
833
+ "description": "Maximum distance between two pictures to be considered in the same sequence (in meters). If both split_distance and split_time are None, no split will occur by default.",
834
+ },
835
+ "split_time": {
836
+ "type": "integer",
837
+ "description": "Maximum time interval between two pictures to be considered in the same sequence. If both split_distance and split_time are None, no split will occur by default.",
838
+ },
839
+ "duplicate_distance": {
840
+ "type": "integer",
841
+ "description": "Maximum distance between two pictures to be considered as duplicates (in meters). If both duplicate_distance andduplicate_rotation are None, no deduplication will occur by default.",
842
+ },
843
+ "duplicate_rotation": {
844
+ "type": "integer",
845
+ "description": "Maximum angle of rotation for two too-close-pictures to be considered as duplicates (in degrees).",
846
+ },
847
+ },
848
+ "required": ["collaborative_metadata", "duplicate_distance", "duplicate_rotation", "split_distance", "split_time"],
849
+ },
779
850
  },
780
851
  "required": ["auth"],
781
852
  },
@@ -841,9 +912,12 @@ Available properties are:
841
912
  "GeoVisioAnnotation": annotations_utils.Annotation.model_json_schema(
842
913
  ref_template="#/components/schemas/GeoVisioAnnotation/$defs/{model}", mode="serialization"
843
914
  ),
844
- "GeoVisioPostAnnotation": annotations_utils.AnnotationCreationParameter.model_json_schema(
915
+ "GeoVisioPostAnnotation": annotations.AnnotationPostParameter.model_json_schema(
845
916
  ref_template="#/components/schemas/GeoVisioPostAnnotation/$defs/{model}", mode="serialization"
846
917
  ),
918
+ "GeoVisioPatchAnnotation": annotations.AnnotationPatchParameter.model_json_schema(
919
+ ref_template="#/components/schemas/GeoVisioPatchAnnotation/$defs/{model}", mode="serialization"
920
+ ),
847
921
  },
848
922
  "parameters": {
849
923
  "STAC_bbox": {"$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/item-search/openapi.yaml#/components/parameters/bbox"},
@@ -871,10 +945,11 @@ Available properties are:
871
945
  "description": """
872
946
  A CQL2 filter expression for filtering sequences.
873
947
 
874
- Allowed properties are:
948
+ Allowed properties are:
875
949
  * "created": upload date
876
950
  * "updated": last edit date
877
- * "status": status of the sequence. Can either be "ready" (for collections ready to be served) or "deleted" for deleted collection. By default, only the "ready" collections will be shown.
951
+
952
+ Note: the `status` filter is not supported anymore, use the `show_deleted` parameter instead if you need to query deleted collections
878
953
 
879
954
  Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
880
955
 
@@ -895,7 +970,7 @@ Examples:
895
970
  "description": """
896
971
  A CQL2 filter expression for filtering tiles.
897
972
 
898
- Allowed properties are:
973
+ Allowed properties are:
899
974
  * "status": status of the sequence. Can either be "ready" (for collections ready to be served) or "hidden" for hidden collections. By default, only the "ready" collections will be shown.
900
975
 
901
976
  Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
@@ -939,6 +1014,24 @@ Note that this parameter is not taken in account for 360° pictures, as by defin
939
1014
  "required": False,
940
1015
  "schema": {"type": "integer", "minimum": 2, "maximum": 180, "default": 30},
941
1016
  },
1017
+ "GeoVisioSearchSortedBy": {
1018
+ "name": "sortby",
1019
+ "in": "query",
1020
+ "description": """Define the sort order of the results of a search.
1021
+ Sort order is defined based on preceding '+' (asc) or '-' (desc).
1022
+
1023
+ By default we sort to get the last updated pictures first (-updated).
1024
+
1025
+ Available properties are:
1026
+ * `ts`: capture datetime of the picture
1027
+ * `updated`: sort by updated datetime of the picture
1028
+ * `id`: us the picture ID for sort
1029
+ """,
1030
+ "required": False,
1031
+ "schema": {
1032
+ "type": "string",
1033
+ },
1034
+ },
942
1035
  "searchCQL2_filter": {
943
1036
  "name": "filter",
944
1037
  "in": "query",
@@ -955,11 +1048,14 @@ For the moment only equality (`=`) and list (`IN`) filters are supported. We do
955
1048
 
956
1049
  To search for any values of a semantic tag, use `semantics.some_key IS NOT NULL` (case matter here).
957
1050
 
1051
+ To search for items with any semantic tags, use `"semantics" IS NOT NULL`.
1052
+
958
1053
  Examples:
959
1054
 
960
1055
  * "semantics.osm|traffic_sign"='yes'
961
1056
  * "semantics.osm|traffic_sign" IS NOT NULL'
962
1057
  * "semantics.osm|amenity" IN ('bench', 'whatever') OR "semantics.osm|traffic_sign"='yes'
1058
+ * "semantics" IS NOT NULL
963
1059
  """,
964
1060
  "required": False,
965
1061
  "schema": {
@@ -972,7 +1068,7 @@ Examples:
972
1068
  "description": """
973
1069
  A CQL2 filter expression for filtering reports.
974
1070
 
975
- Allowed properties are:
1071
+ Allowed properties are:
976
1072
  * status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
977
1073
  * reporter: 'me', user account ID or unset
978
1074
  * owner: 'me', user account ID or unset
@@ -997,7 +1093,7 @@ By default, we only show open or waiting reports, sorted by descending creation
997
1093
  "description": """
998
1094
  A CQL2 filter expression for filtering reports.
999
1095
 
1000
- Allowed properties are:
1096
+ Allowed properties are:
1001
1097
  * status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
1002
1098
  * reporter: 'me' or unset
1003
1099
  * owner: 'me' or unset
@@ -1022,7 +1118,7 @@ By default, we only show open or waiting reports concerning you, sorted by desce
1022
1118
  "description": """
1023
1119
  A CQL2 filter expression for filtering upload sets.
1024
1120
 
1025
- Allowed properties are:
1121
+ Allowed properties are:
1026
1122
  * completed: TRUE or FALSE
1027
1123
  * dispatched: TRUE or FALSE
1028
1124
 
@@ -1092,7 +1188,7 @@ def getApiInfo():
1092
1188
  """Return API metadata parsed from pyproject.toml"""
1093
1189
  apiMeta = metadata.metadata("geovisio")
1094
1190
 
1095
- # url is formated like 'Home, <url>
1191
+ # url is formatted like 'Home, <url>
1096
1192
  url = apiMeta["Project-URL"].split(",")[1].rstrip()
1097
1193
  # there can be several authors, but we only display the first one in docs
1098
1194
  author = apiMeta["Author-email"].split(",")[0]