__init__.py
4.9 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
# 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_service_list
from . import image_tile_mask
from . import image_register,image_list,image_info,image_edit,image_overview
from . import image_tag_create,image_tag_delete,image_tag_list
class DataManager(BlueprintApi):
bp = Blueprint("Image", __name__, url_prefix="/API/Service/Image")
service_type = ["ImageWMS","ImageWMTS"]
@staticmethod
@bp.route('/Register', methods=['POST'])
@swag_from(image_register.Api.api_doc)
def image_register():
"""
影像注册
"""
return image_register.Api().result
@staticmethod
@bp.route('/Edit', methods=['POST'])
@swag_from(image_edit.Api.api_doc)
def api_image_edit():
"""
影像Info
"""
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('/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('/ServiceList', methods=['GET'])
@swag_from(image_service_list.Api.api_doc)
def api_image_service_list():
"""
服务列表
"""
return image_service_list.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=['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('/WMS', methods=['GET','POST'])
@swag_from(image_wms.Api.api_doc)
def image_wms():
"""
WMS服务
"""
return image_wms.Api().result