geovisio 2.5.0__py3-none-any.whl → 2.7.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.
- geovisio/__init__.py +38 -8
- geovisio/admin_cli/__init__.py +2 -2
- geovisio/admin_cli/db.py +8 -0
- geovisio/config_app.py +64 -0
- geovisio/db_migrations.py +24 -3
- geovisio/templates/main.html +14 -14
- geovisio/templates/viewer.html +3 -3
- geovisio/translations/de/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/de/LC_MESSAGES/messages.po +667 -0
- geovisio/translations/en/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/en/LC_MESSAGES/messages.po +730 -0
- geovisio/translations/es/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/es/LC_MESSAGES/messages.po +778 -0
- geovisio/translations/fi/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/fi/LC_MESSAGES/messages.po +589 -0
- geovisio/translations/fr/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/fr/LC_MESSAGES/messages.po +814 -0
- geovisio/translations/ko/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/ko/LC_MESSAGES/messages.po +685 -0
- geovisio/translations/messages.pot +686 -0
- geovisio/translations/nl/LC_MESSAGES/messages.mo +0 -0
- geovisio/translations/nl/LC_MESSAGES/messages.po +594 -0
- geovisio/utils/__init__.py +1 -1
- geovisio/utils/auth.py +50 -11
- geovisio/utils/db.py +65 -0
- geovisio/utils/excluded_areas.py +83 -0
- geovisio/utils/extent.py +30 -0
- geovisio/utils/fields.py +1 -1
- geovisio/utils/filesystems.py +0 -1
- geovisio/utils/link.py +14 -0
- geovisio/utils/params.py +20 -0
- geovisio/utils/pictures.py +94 -69
- geovisio/utils/reports.py +171 -0
- geovisio/utils/sequences.py +288 -126
- geovisio/utils/tokens.py +37 -42
- geovisio/utils/upload_set.py +654 -0
- geovisio/web/auth.py +50 -37
- geovisio/web/collections.py +305 -319
- geovisio/web/configuration.py +14 -0
- geovisio/web/docs.py +288 -12
- geovisio/web/excluded_areas.py +377 -0
- geovisio/web/items.py +203 -151
- geovisio/web/map.py +322 -106
- geovisio/web/params.py +69 -26
- geovisio/web/pictures.py +14 -31
- geovisio/web/reports.py +399 -0
- geovisio/web/rss.py +13 -7
- geovisio/web/stac.py +129 -121
- geovisio/web/tokens.py +105 -112
- geovisio/web/upload_set.py +768 -0
- geovisio/web/users.py +100 -73
- geovisio/web/utils.py +38 -9
- geovisio/workers/runner_pictures.py +278 -183
- geovisio-2.7.0.dist-info/METADATA +95 -0
- geovisio-2.7.0.dist-info/RECORD +66 -0
- geovisio-2.5.0.dist-info/METADATA +0 -115
- geovisio-2.5.0.dist-info/RECORD +0 -41
- {geovisio-2.5.0.dist-info → geovisio-2.7.0.dist-info}/LICENSE +0 -0
- {geovisio-2.5.0.dist-info → geovisio-2.7.0.dist-info}/WHEEL +0 -0
geovisio/web/configuration.py
CHANGED
|
@@ -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"
|
|
@@ -120,10 +144,63 @@ API_CONFIG = {
|
|
|
120
144
|
"STACItemSearchBody": {
|
|
121
145
|
"$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/item-search/openapi.yaml#/components/schemas/searchBody"
|
|
122
146
|
},
|
|
147
|
+
"MapLibreStyleJSON": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"description": """MapLibre Style JSON, see https://maplibre.org/maplibre-style-spec/ for reference.
|
|
150
|
+
|
|
151
|
+
Source ID is either \"geovisio\" or \"geovisio_{userId}\".
|
|
152
|
+
|
|
153
|
+
Layers ID are \"geovisio_grid\", \"geovisio_sequences\" and \"geovisio_pictures\", or with user UUID included (\"geovisio_{userId}_sequences\" and \"geovisio_{userId}_pictures\").
|
|
154
|
+
|
|
155
|
+
Note that you may not rely only on these ID that could change through time.
|
|
156
|
+
""",
|
|
157
|
+
"properties": {
|
|
158
|
+
"version": {"type": "integer", "example": 8},
|
|
159
|
+
"name": {"type": "string", "example": "GeoVisio Vector Tiles"},
|
|
160
|
+
"sources": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"properties": {
|
|
163
|
+
"geovisio": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"properties": {
|
|
166
|
+
"type": {"type": "string", "example": "vector"},
|
|
167
|
+
"minzoom": {"type": "integer", "example": "0"},
|
|
168
|
+
"maxzoom": {"type": "integer", "example": "15"},
|
|
169
|
+
"tiles": {"type": "array", "items": {"type": "string"}},
|
|
170
|
+
},
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
"layers": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"id": {"type": "string"},
|
|
180
|
+
"source": {"type": "string"},
|
|
181
|
+
"source-layer": {"type": "string"},
|
|
182
|
+
"type": {"type": "string"},
|
|
183
|
+
"paint": {"type": "object"},
|
|
184
|
+
"layout": {"type": "object"},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
123
190
|
"GeoVisioLanding": {
|
|
124
191
|
"allOf": [
|
|
125
192
|
{"$ref": "#/components/schemas/STACLanding"},
|
|
126
|
-
{
|
|
193
|
+
{
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"extent": {"$ref": "#/components/schemas/STACExtent"},
|
|
197
|
+
"geovisio_version": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "The GeoVisio API version number",
|
|
200
|
+
"example": "2.6.0-12-ab12cd34",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
127
204
|
]
|
|
128
205
|
},
|
|
129
206
|
"GeoVisioCatalog": {
|
|
@@ -148,12 +225,31 @@ API_CONFIG = {
|
|
|
148
225
|
},
|
|
149
226
|
]
|
|
150
227
|
},
|
|
228
|
+
"GeoVisioPostUploadSet": upload_set.UploadSetCreationParameter.model_json_schema(
|
|
229
|
+
ref_template="#/components/schemas/GeoVisioPostUploadSet/$defs/{model}", mode="serialization"
|
|
230
|
+
),
|
|
231
|
+
"GeoVisioUploadSet": upload_set_utils.UploadSet.model_json_schema(
|
|
232
|
+
ref_template="#/components/schemas/GeoVisioUploadSet/$defs/{model}", mode="serialization"
|
|
233
|
+
),
|
|
234
|
+
"GeoVisioAddToUploadSet": upload_set.AddFileToUploadSetParameter.model_json_schema(
|
|
235
|
+
ref_template="#/components/schemas/GeoVisioAddToUploadSet/$defs/{model}", mode="serialization"
|
|
236
|
+
),
|
|
237
|
+
"GeoVisioUploadSets": upload_set_utils.UploadSets.model_json_schema(
|
|
238
|
+
ref_template="#/components/schemas/GeoVisioUploadSets/$defs/{model}", mode="serialization"
|
|
239
|
+
),
|
|
240
|
+
"GeoVisioUploadSetFile": upload_set_utils.UploadSetFile.model_json_schema(
|
|
241
|
+
ref_template="#/components/schemas/GeoVisioUploadSetFile/$defs/{model}", mode="serialization"
|
|
242
|
+
),
|
|
243
|
+
"GeoVisioUploadSetFiles": upload_set_utils.UploadSetFiles.model_json_schema(
|
|
244
|
+
ref_template="#/components/schemas/GeoVisioUploadSetFiles/$defs/{model}", mode="serialization"
|
|
245
|
+
),
|
|
151
246
|
"GeoVisioCollectionOfCollection": {
|
|
152
247
|
"allOf": [
|
|
153
248
|
{"$ref": "#/components/schemas/STACCollection"},
|
|
154
249
|
{
|
|
155
250
|
"type": "object",
|
|
156
251
|
"properties": {
|
|
252
|
+
"geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
|
|
157
253
|
"links": {
|
|
158
254
|
"type": "array",
|
|
159
255
|
"items": {
|
|
@@ -163,6 +259,7 @@ API_CONFIG = {
|
|
|
163
259
|
"stats:items": {"$ref": "#/components/schemas/STACStatsForItems"},
|
|
164
260
|
"extent": {"$ref": "#/components/schemas/STACExtentTemporal"},
|
|
165
261
|
"geovisio:status": {"$ref": "#/components/schemas/GeoVisioCollectionStatus"},
|
|
262
|
+
"geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
|
|
166
263
|
"created": {
|
|
167
264
|
"type": "string",
|
|
168
265
|
"format": "date-time",
|
|
@@ -175,7 +272,7 @@ API_CONFIG = {
|
|
|
175
272
|
},
|
|
176
273
|
},
|
|
177
274
|
},
|
|
178
|
-
}
|
|
275
|
+
},
|
|
179
276
|
},
|
|
180
277
|
},
|
|
181
278
|
]
|
|
@@ -220,6 +317,18 @@ API_CONFIG = {
|
|
|
220
317
|
},
|
|
221
318
|
},
|
|
222
319
|
},
|
|
320
|
+
"GeoVisioProvider": {
|
|
321
|
+
# In geovisio, Provider have an additional optional ID
|
|
322
|
+
"allOf": [
|
|
323
|
+
{"$ref": "#/components/schemas/STACProvider"},
|
|
324
|
+
{
|
|
325
|
+
"type": "object",
|
|
326
|
+
"properties": {
|
|
327
|
+
"id": {"type": "string", "format": "uuid"},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
]
|
|
331
|
+
},
|
|
223
332
|
"GeoVisioCollection": {
|
|
224
333
|
"allOf": [
|
|
225
334
|
{"$ref": "#/components/schemas/STACCollection"},
|
|
@@ -229,6 +338,14 @@ API_CONFIG = {
|
|
|
229
338
|
"stats:items": {"$ref": "#/components/schemas/STACStatsForItems"},
|
|
230
339
|
"geovisio:status": {"$ref": "#/components/schemas/GeoVisioCollectionStatus"},
|
|
231
340
|
"geovisio:sorted-by": {"$ref": "#/components/schemas/GeoVisioCollectionSortedBy"},
|
|
341
|
+
"geovisio:upload-software": {"$ref": "#/components/schemas/GeoVisioCollectionUploadSoftware"},
|
|
342
|
+
"geovisio:length_km": {"$ref": "#/components/schemas/GeoVisioLengthKm"},
|
|
343
|
+
"providers": {
|
|
344
|
+
"type": "array",
|
|
345
|
+
"items": {
|
|
346
|
+
"$ref": "#/components/schemas/GeoVisioProvider",
|
|
347
|
+
},
|
|
348
|
+
},
|
|
232
349
|
},
|
|
233
350
|
},
|
|
234
351
|
]
|
|
@@ -312,6 +429,11 @@ If unset, sort order is unchanged.
|
|
|
312
429
|
"properties": {
|
|
313
430
|
"type": "object",
|
|
314
431
|
"properties": {
|
|
432
|
+
"datetimetz": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"format": "date-time",
|
|
435
|
+
"title": "Date & time with original timezone information",
|
|
436
|
+
},
|
|
315
437
|
"geovisio:status": {"$ref": "#/components/schemas/GeoVisioItemStatus"},
|
|
316
438
|
"geovisio:producer": {"type": "string"},
|
|
317
439
|
"geovisio:image": {"type": "string", "format": "uri"},
|
|
@@ -349,7 +471,7 @@ If unset, sort order is unchanged.
|
|
|
349
471
|
"GeoVisioPostItem": {
|
|
350
472
|
"type": "object",
|
|
351
473
|
"patternProperties": {
|
|
352
|
-
"override_(Exif|Xmp)\..+": {
|
|
474
|
+
r"override_(Exif|Xmp)\..+": {
|
|
353
475
|
"type": "string",
|
|
354
476
|
"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.",
|
|
355
477
|
}
|
|
@@ -395,12 +517,12 @@ If unset, sort order is unchanged.
|
|
|
395
517
|
"place_position": {
|
|
396
518
|
"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.",
|
|
397
519
|
"type": "string",
|
|
398
|
-
"pattern": "-?\d+\.\d+,-?\d+\.\d+",
|
|
520
|
+
"pattern": r"-?\d+\.\d+,-?\d+\.\d+",
|
|
399
521
|
},
|
|
400
522
|
"place_distance": {
|
|
401
523
|
"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.",
|
|
402
524
|
"type": "string",
|
|
403
|
-
"pattern": "\d+-\d+",
|
|
525
|
+
"pattern": r"\d+-\d+",
|
|
404
526
|
},
|
|
405
527
|
"place_fov_tolerance": {
|
|
406
528
|
"type": "integer",
|
|
@@ -445,6 +567,7 @@ Note that this parameter is not taken in account for 360° pictures, as by defin
|
|
|
445
567
|
},
|
|
446
568
|
},
|
|
447
569
|
"GeoVisioCollectionStatus": {"type": "string", "enum": ["ready", "broken", "preparing", "waiting-for-process"]},
|
|
570
|
+
"GeoVisioLengthKm": {"type": "number", "description": "Total length of sequence (in kilometers)"},
|
|
448
571
|
"GeoVisioCollectionSortedBy": {
|
|
449
572
|
"description": """
|
|
450
573
|
Define the pictures sort order of the sequence. Null by default, and can be set via the collection PATCH.
|
|
@@ -458,10 +581,39 @@ Available properties are:
|
|
|
458
581
|
"type": "string",
|
|
459
582
|
"enum": ["+gpsdate", "-gpsdate", "+filedate", "-filedate", "+filename", "-filename"],
|
|
460
583
|
},
|
|
584
|
+
"GeoVisioCollectionUploadSoftware": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"enum": ["unknown", "other", "website", "cli", "mobile_app"],
|
|
587
|
+
"description": "Simplified name of software used to create this collection",
|
|
588
|
+
},
|
|
461
589
|
"GeoVisioItemStatus": {
|
|
462
590
|
"type": "string",
|
|
463
591
|
"enum": ["ready", "broken", "waiting-for-process"],
|
|
464
592
|
},
|
|
593
|
+
"GeoVisioPostReport": reports.ReportCreationParameter.model_json_schema(
|
|
594
|
+
ref_template="#/components/schemas/GeoVisioPostReport/$defs/{model}", mode="serialization"
|
|
595
|
+
),
|
|
596
|
+
"GeoVisioPatchReport": reports.EditReportParameter.model_json_schema(
|
|
597
|
+
ref_template="#/components/schemas/GeoVisioPatchReport/$defs/{model}", mode="serialization"
|
|
598
|
+
),
|
|
599
|
+
"GeoVisioReport": reports_utils.Report.model_json_schema(
|
|
600
|
+
ref_template="#/components/schemas/GeoVisioReport/$defs/{model}", mode="serialization"
|
|
601
|
+
),
|
|
602
|
+
"GeoVisioReports": reports_utils.Reports.model_json_schema(
|
|
603
|
+
ref_template="#/components/schemas/GeoVisioReports/$defs/{model}", mode="serialization"
|
|
604
|
+
),
|
|
605
|
+
"GeoVisioExcludedArea": excluded_areas_utils.ExcludedAreaFeature.model_json_schema(
|
|
606
|
+
ref_template="#/components/schemas/GeoVisioExcludedArea/$defs/{model}", mode="serialization"
|
|
607
|
+
),
|
|
608
|
+
"GeoVisioExcludedAreas": excluded_areas_utils.ExcludedAreaFeatureCollection.model_json_schema(
|
|
609
|
+
ref_template="#/components/schemas/GeoVisioExcludedAreas/$defs/{model}", mode="serialization"
|
|
610
|
+
),
|
|
611
|
+
"GeoVisioExcludedAreaCreateFeature": excluded_areas.ExcludedAreaCreateFeature.model_json_schema(
|
|
612
|
+
ref_template="#/components/schemas/GeoVisioExcludedAreaCreateFeature/$defs/{model}", mode="serialization"
|
|
613
|
+
),
|
|
614
|
+
"GeoVisioExcludedAreaCreateCollection": excluded_areas.ExcludedAreaCreateCollection.model_json_schema(
|
|
615
|
+
ref_template="#/components/schemas/GeoVisioExcludedAreaCreateCollection/$defs/{model}", mode="serialization"
|
|
616
|
+
),
|
|
465
617
|
"GeoVisioUserList": {
|
|
466
618
|
"type": "object",
|
|
467
619
|
"properties": {
|
|
@@ -521,6 +673,39 @@ Available properties are:
|
|
|
521
673
|
"GeoVisioConfiguration": {
|
|
522
674
|
"type": "object",
|
|
523
675
|
"properties": {
|
|
676
|
+
"name": {
|
|
677
|
+
"type": "object",
|
|
678
|
+
"properties": {
|
|
679
|
+
"label": {"type": "string", "description": "User-readable server name, in user language"},
|
|
680
|
+
"langs": {
|
|
681
|
+
"type": "object",
|
|
682
|
+
"additionalProperties": "string",
|
|
683
|
+
"description": "Translated names as lang -> value object",
|
|
684
|
+
"default": {"en": "GeoVisio"},
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
},
|
|
688
|
+
"description": {
|
|
689
|
+
"type": "object",
|
|
690
|
+
"properties": {
|
|
691
|
+
"label": {"type": "string", "description": "User-readable server description, in user language"},
|
|
692
|
+
"langs": {
|
|
693
|
+
"type": "object",
|
|
694
|
+
"additionalProperties": "string",
|
|
695
|
+
"description": "Translated descriptions as lang -> value object",
|
|
696
|
+
"default": {"en": "The open source photo mapping solution"},
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
},
|
|
700
|
+
"logo": {
|
|
701
|
+
"default": "https://gitlab.com/panoramax/gitlab-profile/-/raw/main/images/logo.svg",
|
|
702
|
+
"format": "uri",
|
|
703
|
+
"maxLength": 2083,
|
|
704
|
+
"minLength": 1,
|
|
705
|
+
"title": "Logo",
|
|
706
|
+
"type": "string",
|
|
707
|
+
},
|
|
708
|
+
"color": {"default": "#bf360c", "format": "color", "title": "Color", "type": "string"},
|
|
524
709
|
"auth": {
|
|
525
710
|
"type": "object",
|
|
526
711
|
"properties": {
|
|
@@ -537,6 +722,11 @@ Available properties are:
|
|
|
537
722
|
},
|
|
538
723
|
"required": ["id"],
|
|
539
724
|
},
|
|
725
|
+
"geovisio_version": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"description": "The GeoVisio API version number",
|
|
728
|
+
"example": "2.6.0-12-ab12cd34",
|
|
729
|
+
},
|
|
540
730
|
},
|
|
541
731
|
"required": ["auth"],
|
|
542
732
|
},
|
|
@@ -558,7 +748,7 @@ Available properties are:
|
|
|
558
748
|
},
|
|
559
749
|
},
|
|
560
750
|
},
|
|
561
|
-
"
|
|
751
|
+
"GeoVisioEncodedToken": {
|
|
562
752
|
"type": "object",
|
|
563
753
|
"properties": {
|
|
564
754
|
"id": {"type": "string"},
|
|
@@ -572,7 +762,7 @@ Available properties are:
|
|
|
572
762
|
},
|
|
573
763
|
"JWTokenClaimable": {
|
|
574
764
|
"allOf": [
|
|
575
|
-
{"$ref": "#/components/schemas/
|
|
765
|
+
{"$ref": "#/components/schemas/GeoVisioEncodedToken"},
|
|
576
766
|
{
|
|
577
767
|
"type": "object",
|
|
578
768
|
"properties": {
|
|
@@ -591,6 +781,14 @@ Available properties are:
|
|
|
591
781
|
},
|
|
592
782
|
]
|
|
593
783
|
},
|
|
784
|
+
"GeoVisioError": {
|
|
785
|
+
"type": "object",
|
|
786
|
+
"properties": {
|
|
787
|
+
"message": {"type": "string", "description": "The error message"},
|
|
788
|
+
"status_code": {"type": "integer", "description": "The HTTP status code"},
|
|
789
|
+
"payload": {"type": "object", "description": "The error payload"},
|
|
790
|
+
},
|
|
791
|
+
},
|
|
594
792
|
},
|
|
595
793
|
"parameters": {
|
|
596
794
|
"STAC_bbox": {"$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/item-search/openapi.yaml#/components/parameters/bbox"},
|
|
@@ -655,14 +853,14 @@ Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials
|
|
|
655
853
|
"in": "query",
|
|
656
854
|
"required": False,
|
|
657
855
|
"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.",
|
|
658
|
-
"schema": {"type": "string", "pattern": "-?\d+\.\d+,-?\d+\.\d+"},
|
|
856
|
+
"schema": {"type": "string", "pattern": r"-?\d+\.\d+,-?\d+\.\d+"},
|
|
659
857
|
},
|
|
660
858
|
"GeoVisio_place_distance": {
|
|
661
859
|
"name": "place_distance",
|
|
662
860
|
"in": "query",
|
|
663
861
|
"required": False,
|
|
664
862
|
"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.",
|
|
665
|
-
"schema": {"type": "string", "pattern": "\d+-\d+", "default": "3-15"},
|
|
863
|
+
"schema": {"type": "string", "pattern": r"\d+-\d+", "default": "3-15"},
|
|
666
864
|
},
|
|
667
865
|
"GeoVisio_place_fov_tolerance": {
|
|
668
866
|
"name": "place_fov_tolerance",
|
|
@@ -686,6 +884,78 @@ Note that this parameter is not taken in account for 360° pictures, as by defin
|
|
|
686
884
|
"required": False,
|
|
687
885
|
"schema": {"type": "integer", "minimum": 2, "maximum": 180, "default": 30},
|
|
688
886
|
},
|
|
887
|
+
"GeoVisioReports_filter": {
|
|
888
|
+
"name": "filter",
|
|
889
|
+
"in": "query",
|
|
890
|
+
"description": """
|
|
891
|
+
A CQL2 filter expression for filtering reports.
|
|
892
|
+
|
|
893
|
+
Allowed properties are:
|
|
894
|
+
* status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
|
|
895
|
+
* reporter: 'me', user account ID or unset
|
|
896
|
+
* owner: 'me', user account ID or unset
|
|
897
|
+
|
|
898
|
+
Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
|
|
899
|
+
|
|
900
|
+
Examples:
|
|
901
|
+
|
|
902
|
+
* status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')
|
|
903
|
+
|
|
904
|
+
By default, we only show open or waiting reports, sorted by descending creation date.
|
|
905
|
+
""",
|
|
906
|
+
"required": False,
|
|
907
|
+
"schema": {
|
|
908
|
+
"type": "string",
|
|
909
|
+
"default": "status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')",
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
"GeoVisioUserReports_filter": {
|
|
913
|
+
"name": "filter",
|
|
914
|
+
"in": "query",
|
|
915
|
+
"description": """
|
|
916
|
+
A CQL2 filter expression for filtering reports.
|
|
917
|
+
|
|
918
|
+
Allowed properties are:
|
|
919
|
+
* status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
|
|
920
|
+
* reporter: 'me' or unset
|
|
921
|
+
* owner: 'me' or unset
|
|
922
|
+
|
|
923
|
+
Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
|
|
924
|
+
|
|
925
|
+
Examples:
|
|
926
|
+
|
|
927
|
+
* status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')
|
|
928
|
+
|
|
929
|
+
By default, we only show open or waiting reports concerning you, sorted by descending creation date.
|
|
930
|
+
""",
|
|
931
|
+
"required": False,
|
|
932
|
+
"schema": {
|
|
933
|
+
"type": "string",
|
|
934
|
+
"default": "status IN ('open', 'open_autofix', 'waiting') AND (reporter = 'me' OR owner = 'me')",
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
"UploadSetFilter": {
|
|
938
|
+
"name": "filter",
|
|
939
|
+
"in": "query",
|
|
940
|
+
"description": """
|
|
941
|
+
A CQL2 filter expression for filtering upload sets.
|
|
942
|
+
|
|
943
|
+
Allowed properties are:
|
|
944
|
+
* completed: TRUE or FALSE
|
|
945
|
+
* dispatched: TRUE or FALSE
|
|
946
|
+
|
|
947
|
+
Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
|
|
948
|
+
|
|
949
|
+
Examples:
|
|
950
|
+
|
|
951
|
+
* 'completed = TRUE AND dispatched = FALSE'
|
|
952
|
+
|
|
953
|
+
By default, we only show non dispatched upload sets.
|
|
954
|
+
If you want all the upload sets, you need to set an empty filter or a filter that matches everything.
|
|
955
|
+
""",
|
|
956
|
+
"required": False,
|
|
957
|
+
"schema": {"type": "string", "default": "completed=FALSE AND dispatched = FALSE"},
|
|
958
|
+
},
|
|
689
959
|
"OGC_sortby": {
|
|
690
960
|
"name": "sortby",
|
|
691
961
|
"in": "query",
|
|
@@ -746,7 +1016,7 @@ def getApiInfo():
|
|
|
746
1016
|
author = apiMeta["Author-email"].split(",")[0]
|
|
747
1017
|
m = AUTHOR_RGX.match(author)
|
|
748
1018
|
if not m:
|
|
749
|
-
raise Exception("
|
|
1019
|
+
raise Exception("Impossible to find email in pyproject")
|
|
750
1020
|
name = m.group("Name")
|
|
751
1021
|
email = m.group("Email")
|
|
752
1022
|
|
|
@@ -768,8 +1038,14 @@ def getApiDocs():
|
|
|
768
1038
|
{"name": "Sequences", "description": "Collections of pictures"},
|
|
769
1039
|
{"name": "Pictures", "description": "Geolocated images"},
|
|
770
1040
|
{"name": "Map", "description": "Tiles for web map display"},
|
|
771
|
-
{
|
|
1041
|
+
{
|
|
1042
|
+
"name": "Upload",
|
|
1043
|
+
"description": "Sending pictures & sequences",
|
|
1044
|
+
"externalDocs": {"url": "https://docs.panoramax.fr/api/api/api/#upload"},
|
|
1045
|
+
},
|
|
772
1046
|
{"name": "Editing", "description": "Modifying pictures & sequences"},
|
|
1047
|
+
{"name": "Reports", "description": "Report issues with pictures & sequences"},
|
|
1048
|
+
{"name": "Excluded Areas", "description": "Areas where pictures cannot be uploaded"},
|
|
773
1049
|
{"name": "Users", "description": "Account management"},
|
|
774
1050
|
{"name": "Auth", "description": "User authentication"},
|
|
775
1051
|
],
|