image_wms_kv.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
62
# coding=utf-8
#author: 4N
#createtime: 2021/3/24
#email: nheweijun@sina.com
from app.util.component.ApiTemplate import ApiTemplate
from .util.ImageWMSServer import ImageWMSServer
class Api(ApiTemplate):
api_name = "WMS"
def process(self):
try:
instance = ImageWMSServer()
if self.para.get("guid"):
response = instance.wms(self.para.get("service_name"),self.para)
else:
response = instance.wms(self.para.get("guid"), self.para,type="guid")
except Exception as e:
raise e
return response
api_doc = {
"tags": ["影像接口"],
"parameters": [
{"name": "guid",
"in": "query",
"type": "string"},
{"name": "service_name",
"in": "query",
"type": "string"},
{"name": "bbox",
"in": "query",
"type": "string"},
{"name": "width",
"in": "query",
"type": "string"},
{"name": "height",
"in": "query",
"type": "string"},
{"name": "format",
"in": "query",
"type": "string"},
{"name": "quality",
"in": "query",
"type": "string"}
],
"responses": {
200: {
"schema": {
"properties": {
}
}
}
}
}