__init__.py
6.6 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# coding=utf-8
#author: 4N
#createtime: 2021/5/18
#email: nheweijun@sina.com
from flasgger import swag_from
from flask import Blueprint
from app.util import BlueprintApi
from . import image_service_register
from . import image_server_list
from . import data_list
from . import capabilities
from . import image_tile,image_wms
from . import image_tile_mask
from . import image_wmts
from . import image_delete
from . import image_cancle
from . import image_register,image_list,image_info,image_edit,image_overview
from . import image_tag_create,image_tag_delete,image_tag_list
from . import image_wms_temporary
from . import image_wms_kv
from . import image_build_pyramid
from . import image_refresh
class ImageServerInstance:
pass
class ImageManager(BlueprintApi):
bp = Blueprint("ImageService", __name__, url_prefix="/API/Service/Image")
service_type = ["影像服务"]
@staticmethod
@bp.route('/Register', methods=['POST'])
@swag_from(image_register.Api.api_doc)
def image_register():
"""
影像注册
"""
return image_register.Api().result
@staticmethod
@bp.route('/Delete', methods=['POST'])
@swag_from(image_delete.Api.api_doc)
def api_image_delete():
"""
影像删除
"""
return image_delete.Api().result
@staticmethod
@bp.route('/Cancle', methods=['POST'])
@swag_from(image_cancle.Api.api_doc)
def api_image_cancle():
"""
影像取消注册
"""
return image_cancle.Api().result
@staticmethod
@bp.route('/Edit', methods=['POST'])
@swag_from(image_edit.Api.api_doc)
def api_image_edit():
"""
影像Edit
"""
return image_edit.Api().result
@staticmethod
@bp.route('/Info', methods=['POST'])
@swag_from(image_info.Api.api_doc)
def api_image_info():
"""
影像Info
"""
return image_info.Api().result
@staticmethod
@bp.route('/Overview', methods=['POST'])
@swag_from(image_overview.Api.api_doc)
def api_image_overview():
"""
影像缩略图
"""
return image_overview.Api().result
@staticmethod
@bp.route('/BuildPyramid', methods=['POST'])
@swag_from(image_build_pyramid.Api.api_doc)
def api_image_build_pyramid():
"""
创建影像金字塔
"""
return image_build_pyramid.Api().result
@staticmethod
@bp.route('/Refresh', methods=['POST'])
@swag_from(image_refresh.Api.api_doc)
def api_image_refresh():
"""
影像刷新信息
"""
return image_refresh.Api().result
@staticmethod
@bp.route('/TagCreate', methods=['POST'])
@swag_from(image_tag_create.Api.api_doc)
def api_image_tag_create():
"""
Tag创建
"""
return image_tag_create.Api().result
@staticmethod
@bp.route('/TagDelete', methods=['POST'])
@swag_from(image_tag_delete.Api.api_doc)
def api_image_tag_delete():
"""
Tag删除
"""
return image_tag_delete.Api().result
@staticmethod
@bp.route('/TagList', methods=['POST'])
@swag_from(image_tag_list.Api.api_doc)
def api_image_tag_list():
"""
TagList
"""
return image_tag_list.Api().result
@staticmethod
@bp.route('/ServiceRegister', methods=['POST'])
@swag_from(image_service_register.Api.api_doc)
def image_service_register():
"""
服务注册
"""
return image_service_register.Api().result
@staticmethod
@bp.route('/ServerList', methods=['GET'])
@swag_from(image_server_list.Api.api_doc)
def image_server_list():
"""
服务器列表
"""
return image_server_list.Api().result
@staticmethod
@bp.route('/DataList', methods=['POST'])
@swag_from(data_list.Api.api_doc)
def data_list():
"""
数据列表
"""
return data_list.Api().result
@staticmethod
@bp.route('/Capabilities', methods=['GET','POST'])
@swag_from(capabilities.Api.api_doc)
def capabilities():
"""
能力文档
"""
return capabilities.Api().result
@staticmethod
@bp.route('/ImageList', methods=['POST'])
@swag_from(image_list.Api.api_doc)
def image_list():
"""
影像列表
"""
return image_list.Api().result
@staticmethod
@bp.route('/Tile/<guid>/<l>/<y>/<z>', methods=['GET'])
# @swag_from(image_tile.Api.api_doc)
def api_image_tile(guid,l,y,z):
"""
切片服务
"""
return image_tile.Api(guid,l,y,z).result
@staticmethod
@bp.route('/Tile', methods=['GET','POST'])
# @swag_from(image_tile.Api.api_doc)
def api_image_tile_kv():
"""
切片服务
"""
return image_tile.Api("1",1,1,1).result
# @staticmethod
# @bp.route('/TileMask/<guid>/<l>/<y>/<z>', methods=['GET'])
# @swag_from(image_tile_mask.Api.api_doc)
# def api_image_tile_mask(guid,l,y,z):
# """
# 切片服务
# """
# return image_tile_mask.Api(guid,l,y,z).result
#
# @staticmethod
# @bp.route('/TileMask', methods=['GET','POST'])
# @swag_from(image_tile_mask.Api.api_doc)
# def api_image_tile_mask_kv():
# """
# 切片服务
# """
# return image_tile_mask.Api("1",1,1,1).result
@staticmethod
@bp.route('/<service_name>/WMS', methods=['GET','POST'])
@swag_from(image_wms.Api.api_doc)
def image_wms(service_name):
"""
WMS服务
"""
return image_wms.Api(service_name).result
@staticmethod
@bp.route('/<service_name>/WMTS', methods=['GET','POST'])
@swag_from(image_wmts.Api.api_doc)
def api_image_wmts(service_name):
"""
切片服务
"""
return image_wmts.Api(service_name).result
@staticmethod
@bp.route('/WMS', methods=['GET','POST'])
# @swag_from(image_wms_kv.Api.api_doc)
def image_wms_kv():
"""
WMS服务
"""
return image_wms_kv.Api().result
@staticmethod
@bp.route('/WMSTem', methods=['GET','POST'])
@swag_from(image_wms_temporary.Api.api_doc)
def image_wms_temporary():
"""
WMS服务预览
"""
return image_wms_temporary.Api().result