image_wmts.py
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# coding=utf-8
#author: 4N
#createtime: 2021/3/24
#email: nheweijun@sina.com
import traceback
from app.util.component.ApiTemplate import ApiTemplate
from .util.ImageWMTSServer import ImageWMTSServer
class Api(ApiTemplate):
api_name = "切片"
def __init__(self,service_name):
super().__init__()
self.service_name = service_name
def process(self):
try:
instance = ImageWMTSServer()
response = instance.wmts(self.service_name,self.para)
except Exception as e:
print(traceback.format_exc())
raise e
return response
api_doc = {
"tags": ["影像接口"],
"parameters": [
{"name": "request",
"in": "formData",
"type": "string",
"enum": ["GetTile", "GetCapabilities"]},
{"name": "tilematrix",
"in": "formData",
"type": "string"},
{"name": "tilerow",
"in": "formData",
"type": "string"},
{"name": "tilecol",
"in": "formData",
"type": "string"},
{"name": "format",
"in": "formData",
"type": "string"},
{"name": "quality",
"in": "formData",
"type": "string"}
],
"responses": {
200: {
"schema": {
"properties": {
}
}
}
}
}